Class: EditorController
Stores, modifies and validates changes from the visual graph authoring (added, deleted or changed graph entities and/or relations).
Properties
Property | Modifier | Type | Description |
---|---|---|---|
|
| Events for the editor controller. |
Accessors
authoringState
get
authoringState():AuthoringState
Graph authoring state snapshot.
Returns
Defined in
editor/editorController.tsx:148
inAuthoringMode
get
inAuthoringMode():boolean
Returns true
if the editor is in the graph authoring mode;
otherwise false
.
Returns
boolean
Defined in
editor/editorController.tsx:112
metadataProvider
get
metadataProvider():undefined
|MetadataProvider
Provides strategy for the graph authoring mode.
Returns
undefined
| MetadataProvider
Defined in
editor/editorController.tsx:134
temporaryState
get
temporaryState():TemporaryState
Temporary (transient) state for the graph authoring.
Returns
Defined in
editor/editorController.tsx:190
validationProvider
get
validationProvider():undefined
|ValidationProvider
Provides strategy to validate data changes from the graph authoring.
Returns
undefined
| ValidationProvider
Defined in
editor/editorController.tsx:141
validationState
get
validationState():ValidationState
Validation state snapshot for the data changes from the graph authoring.
Returns
Defined in
editor/editorController.tsx:174
Methods
changeEntity()
changeEntity(
targetIri
,newData
):void
Changes an existing entity with graph authoring.
If no entities with target IRI found on the diagram, no changes will be applied to the graph authoring state.
The operation puts a command to the command history.
Parameters
Parameter | Type |
---|---|
| |
|
Returns
void
Defined in
editor/editorController.tsx:332
changeRelation()
changeRelation(
oldData
,newData
):void
Changes an existing relation with graph authoring.
The operation puts a command to the command history.
Parameters
Parameter | Type |
---|---|
| |
|
Returns
void
Defined in
editor/editorController.tsx:441
createEntity()
createEntity(
data
,options
):EntityElement
Creates a new entity with graph authoring.
The operation puts a command to the command history.
Parameters
Parameter | Type |
---|---|
| |
|
|
|
|
Returns
Defined in
editor/editorController.tsx:301
createRelation()
createRelation(
base
,options
):RelationLink
Creates a new relation with graph authoring.
An error will be thrown if the relation with same identity already exists on the diagram.
The operation puts a command to the command history.
Parameters
Parameter | Type |
---|---|
| |
|
|
|
|
Returns
Defined in
editor/editorController.tsx:400
deleteEntity()
deleteEntity(
elementIri
):void
Deletes an existing entity with graph authoring.
If no entities with target IRI found on the diagram, no changes will be applied to the graph authoring state.
The operation puts a command to the command history.
Parameters
Parameter | Type |
---|---|
|
Returns
void
Defined in
editor/editorController.tsx:362
deleteRelation()
deleteRelation(
data
):void
Deletes an existing relation with graph authoring.
The operation puts a command to the command history.
Parameters
Parameter | Type |
---|---|
|
Returns
void
Defined in
editor/editorController.tsx:518
discardChange()
discardChange(
event
):void
Discards the specified graph authoring event from the state while reverting associated changes to the diagram:
- new entities and links are removed;
- changed entities and links have their data reverted back.
Parameters
Parameter | Type |
---|---|
|
Returns
void
Defined in
editor/editorController.tsx:602
moveRelationSource()
moveRelationSource(
params
):RelationLink
Changes an existing relation with graph authoring by moving its source to another entity element.
The operation puts a command to the command history.
Parameters
Parameter | Type |
---|---|
|
|
| |
|
Returns
Defined in
editor/editorController.tsx:475
moveRelationTarget()
moveRelationTarget(
params
):RelationLink
Changes an existing relation with graph authoring by moving its target to another entity element.
The operation puts a command to the command history.
Parameters
Parameter | Type |
---|---|
|
|
| |
|
Returns
Defined in
editor/editorController.tsx:497
removeAllTemporaryCells()
removeAllTemporaryCells():
void
Removes all diagram cells from the temporary state for the graph authoring.
Returns
void
See
Defined in
editor/editorController.tsx:543
removeItems()
removeItems(
items
):void
Removes the specified diagram cells from the diagram and discards any associated graph authoring state.
The links are only removed when its a new relation added by the graph authoring.
The operation puts a command to the command history.
Parameters
Parameter | Type |
---|---|
|
Returns
void
Defined in
editor/editorController.tsx:254
removeSelectedElements()
removeSelectedElements():
void
Removes all selected diagram elements from the diagram and discards any associated graph authoring state.
The operation puts a command to the command history.
Returns
void
Defined in
editor/editorController.tsx:237
removeTemporaryCells()
removeTemporaryCells(
cells
):void
Removes the specified diagram cells from the temporary state for the graph authoring.
Parameters
Parameter | Type |
---|---|
|
Returns
void
See
Defined in
editor/editorController.tsx:573
revalidateEntities()
revalidateEntities(
entities
):void
Forces re-validation for the specified entities.
Parameters
Parameter | Type |
---|---|
|
|
Returns
void
Defined in
editor/editorController.tsx:218
setAuthoringMode()
setAuthoringMode(
value
):void
Toggles the graph authoring mode for the editor.
Does nothing if metadataProvider is not set.
Parameters
Parameter | Type |
---|---|
|
|
Returns
void
Defined in
editor/editorController.tsx:121
setAuthoringState()
setAuthoringState(
value
):void
Sets graph authoring state.
The operation puts a command to the command history.
Parameters
Parameter | Type |
---|---|
|
Returns
void
Defined in
editor/editorController.tsx:156
setTemporaryState()
setTemporaryState(
value
):void
Sets temporary (transient) state for the graph authoring.
Parameters
Parameter | Type |
---|---|
|
Returns
void
Defined in
editor/editorController.tsx:196
setValidationState()
setValidationState(
value
):void
Sets validation state for the data changes from the graph authoring.
Parameters
Parameter | Type |
---|---|
|
Returns
void