Class: MergeNodes

Kekule.ChemStructOperation. MergeNodes

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.
Source:

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
Source:
Returns:
Type
Bool

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

Kekule.ChemStructOperation. MergeNodes

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
Source:
Returns:
Type
Bool

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