Last updated

API / geotoolkit / controls / tools / editors / commands / SceneChange / SceneChange

Class: SceneChange

commands.SceneChange.SceneChange

Command for changing node's scene position

Hierarchy

Table of contents

Constructors
Methods

Contents

Constructors

new SceneChange(fromParent, fromIndex, toParent, toIndex)

new SceneChange(fromParent, fromIndex, toParent, toIndex)

Parameters

Name Type Description
fromParentCompositeNode<Node>node's current parent node
fromIndexnumbernode's current child position
toParentCompositeNode<Node>node's new parent node
toIndexnumbernode's new child position

Overrides

AbstractCommand.constructor

Methods

createInverse

createInverse(): AbstractCommand

Returns inverse command

Returns

AbstractCommand

Inherited from

AbstractCommand.createInverse


getClassName

getClassName(): string

Returns

string

Inherited from

AbstractCommand.getClassName


getEventName

getEventName(): string

Returns event to be fired when command is applied

Returns

string

Inherited from

AbstractCommand.getEventName


getFromId

getFromId(): number

Returns node index before the command was applied

Returns

number


getFromParent

getFromParent(): CompositeNode<Node>

Returns node's parent before the command was applied

Returns

CompositeNode<Node>


getNode

getNode(): Node | Node[]

Returns target command node

Returns

Node | Node[]

Inherited from

AbstractCommand.getNode


getOptions

getOptions(): Record<string, any>

Returns command options

Returns

Record<string, any>

Inherited from

AbstractCommand.getOptions


getToId

getToId(): number

Returns node index after the command was applied

Returns

number


getToParent

getToParent(): CompositeNode<Node>

Returns node's parent after the command was applied

Returns

CompositeNode<Node>


isRejected

isRejected(): boolean

Returns rejected state

Returns

boolean

the state

Inherited from

AbstractCommand.isRejected


isSeparate

isSeparate(): boolean

Returns true if command is separate, false otherwise

Returns

boolean

Inherited from

AbstractCommand.isSeparate


merge

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.

Parameters

Name Type Description
commandAbstractCommandcommand to merge

Returns

boolean

Inherited from

AbstractCommand.merge


reject

reject(): SceneChange

Rejects action

Returns

SceneChange

this

Inherited from

AbstractCommand.reject


setNode

setNode(node): SceneChange

Sets target node for the command

Parameters

Name Type Description
nodeNode | Node[]node(s) for applying the command

Returns

SceneChange

this

Inherited from

AbstractCommand.setNode


setOptions

setOptions(options): SceneChange

Sets extra options to be stored in command

Parameters

Name Type Description
optionsRecord<string, any>some extra options for the command to store

Returns

SceneChange

this

Inherited from

AbstractCommand.setOptions


setSeparate

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.

Parameters

Name Type Description
isSeparatebooleantrue if command should be considered as a separate operation (in undo/redo history), false otherwise

Returns

SceneChange

this

Inherited from

AbstractCommand.setSeparate


getClassName

Static getClassName(): string

Returns

string

Inherited from

AbstractCommand.getClassName