Class: MergeNodesBase

Kekule.ChemStructOperation. MergeNodesBase

new MergeNodesBase(target, dest, enableStructFragmentMerge)

The base operation of merging two nodes as one, acts as the parent class of MergeNodes and MergeNodesPreview.
Parameters:
Name Type Description
target Kekule.ChemStructureNode Source node, all connectors to this node will be connected to toNode.
dest Kekule.ChemStructureNode Destination node.
enableStructFragmentMerge Bool If true, molecule will be also merged when merging nodes between different molecule.
Properties:
Name Type Description
target Kekule.ChemStructureNode Source node, all connectors to this node will be connected to toNode.
dest Kekule.ChemStructureNode Destination node.
enableStructFragmentMerge Bool If true, molecule will be also merged when merging nodes between different molecule.
Source:

Extends

Methods

execute()

Execute this command.
Inherited From:
Source:

getCommonSiblings(node1, node2) → {Array}

Returns nodes connected with both node1 and node2.
Parameters:
Name Type Description
node1 Kekule.ChemStructureNode
node2 Kekule.ChemStructureNode
Source:
Returns:
Type
Array

isReversible() → {Bool}

Indicate whether this command can be undone. Default is true. Descendants should override this method if unreversible.
Inherited From:
Source:
Returns:
Type
Bool

reverse()

Undo command execution.
Inherited From:
Source:

Kekule.ChemStructOperation. MergeNodesBase

Methods

execute()

Execute this command.
Inherited From:
Source:

getCommonSiblings(node1, node2) → {Array}

Returns nodes connected with both node1 and node2.
Parameters:
Name Type Description
node1 Kekule.ChemStructureNode
node2 Kekule.ChemStructureNode
Source:
Returns:
Type
Array

isReversible() → {Bool}

Indicate whether this command can be undone. Default is true. Descendants should override this method if unreversible.
Inherited From:
Source:
Returns:
Type
Bool

reverse()

Undo command execution.
Inherited From:
Source: