API / geotoolkit / controls / tools / editors / commands / SceneChange / SceneChange
commands.SceneChange.SceneChange
Command for changing node's scene position
↳
SceneChange
Methods
Constructors
• new SceneChange(fromParent, fromIndex, toParent, toIndex)
| Name | Type | Description |
|---|---|---|
fromParent | CompositeNode<Node> | node's current parent node |
fromIndex | number | node's current child position |
toParent | CompositeNode<Node> | node's new parent node |
toIndex | number | node's new child position |
AbstractCommand.constructor
Methods
▸ createInverse(): AbstractCommand
Returns inverse command
▸ getClassName(): string
string
▸ getEventName(): string
Returns event to be fired when command is applied
string
▸ getFromId(): number
Returns node index before the command was applied
number
▸ getFromParent(): CompositeNode<Node>
Returns node's parent before the command was applied
Returns target command node
▸ getOptions(): Record<string, any>
Returns command options
Record<string, any>
▸ getToId(): number
Returns node index after the command was applied
number
▸ getToParent(): CompositeNode<Node>
Returns node's parent after the command was applied
▸ isRejected(): boolean
Returns rejected state
boolean
the state
▸ isSeparate(): boolean
Returns true if command is separate, false otherwise
boolean
▸ merge(command): boolean
Tries to merge current with another command. If successful, return true and second command won't be stored in history. Returns false otherwise.
| Name | Type | Description |
|---|---|---|
command | AbstractCommand | command to merge |
boolean
▸ reject(): SceneChange
Rejects action
this
▸ setNode(node): SceneChange
Sets target node for the command
this
▸ setOptions(options): SceneChange
Sets extra options to be stored in command
| Name | Type | Description |
|---|---|---|
options | Record<string, any> | some extra options for the command to store |
this
▸ setSeparate(isSeparate): SceneChange
Sets command to be separate or not (true by default). Not separate commands are ignored by history undo/redo actions and considered as a part of the last separate command.
| Name | Type | Description |
|---|---|---|
isSeparate | boolean | true if command should be considered as a separate operation (in undo/redo history), false otherwise |
this
▸ Static getClassName(): string
string