new MergeNodes(target, dest, enableStructFragmentMerge)
Operation of merging two nodes as one.
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 |
---|---|---|
changedConnectors |
Array | Connectors modified during merge. |
removedConnectors |
Array | Connectors removed during merge. |
Extends
Methods
-
(static) canMerge(target, dest, canMergeStructFragment) → {Bool}
-
A class method to check if two connectors can be merged
Parameters:
Name Type Description target
Kekule.ChemStructureNode dest
Kekule.ChemStructureNode canMergeStructFragment
Bool Returns:
- Type
- Bool
-
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 - Inherited From:
- 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: