Skip to content
Last updated

API / geotoolkit / welllog / widgets / tools / annotations / commands / ChangeLink / ChangeLink

commands.ChangeLink.ChangeLink

The command for link/unlink the edited node

Hierarchy

Table of contents

Constructors
  • [new ChangeLink()](/solutions/geotoolkit/GeoToolkit_JS/apis/classes/geotoolkit.welllog.widgets-4.tools-5.annotations.commands.changelink.changelink.md#new changelink())
Methods

Contents

Constructors

• new ChangeLink()

Overrides

ExecutableCommand.constructor

Methods

createInverse

▸ createInverse(): ChangeLink

Returns inverse command

Returns

ChangeLink

Overrides

ExecutableCommand.createInverse


execute

▸ execute(editor): boolean

Parameters

Name Type
editorAbstractEditorBase<Node | Node[]&gt;

Returns

boolean

Inherited from

ExecutableCommand.execute


getClassName

▸ getClassName(): string

Returns

string

Inherited from

ExecutableCommand.getClassName


getEventName

▸ getEventName(): string

Returns event to be fired when command is applied

Returns

string

Inherited from

ExecutableCommand.getEventName


getNode

▸ getNode(): Node | Node[]

Returns target command node

Returns

Node | Node[]

Inherited from

ExecutableCommand.getNode


getOptions

▸ getOptions(): Record<string, any&gt;

Returns command options

Returns

Record<string, any&gt;

Inherited from

ExecutableCommand.getOptions


isRejected

▸ isRejected(): boolean

Returns rejected state

Returns

boolean

the state

Inherited from

ExecutableCommand.isRejected


isSeparate

▸ isSeparate(): boolean

Returns true if command is separate, false otherwise

Returns

boolean

Inherited from

ExecutableCommand.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

ExecutableCommand.merge


reject

▸ reject(): ChangeLink

Rejects action

Returns

ChangeLink

this

Inherited from

ExecutableCommand.reject


setNode

▸ setNode(node): ChangeLink

Sets target node for the command

Parameters

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

Returns

ChangeLink

this

Inherited from

ExecutableCommand.setNode


setOptions

▸ setOptions(options): ChangeLink

Sets extra options to be stored in command

Parameters

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

Returns

ChangeLink

this

Inherited from

ExecutableCommand.setOptions


setSeparate

▸ setSeparate(isSeparate): ChangeLink

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

ChangeLink

this

Inherited from

ExecutableCommand.setSeparate


▸ Static canLink(editor): boolean

Parameters

Name Type
editorAbstractEditorBase<Node | Node[]&gt;

Returns

boolean


getClassName

▸ Static getClassName(): string

Returns

string

Inherited from

ExecutableCommand.getClassName


isLinked

▸ Static isLinked(editor): boolean

Parameters

Name Type
editorAbstractEditorBase<Node | Node[]&gt;

Returns

boolean