|
@ -191,6 +191,9 @@ class InteractionHandler { |
|
|
let {nodesChanges, edgesChanges} = this._determineIfDifferent(previousSelection, currentSelection); |
|
|
let {nodesChanges, edgesChanges} = this._determineIfDifferent(previousSelection, currentSelection); |
|
|
|
|
|
|
|
|
if (selectedNodesCount - previouslySelectedNodeCount > 0 || (selectedNodesCount === previouslySelectedNodeCount && nodesChanges === true)) { // node was selected
|
|
|
if (selectedNodesCount - previouslySelectedNodeCount > 0 || (selectedNodesCount === previouslySelectedNodeCount && nodesChanges === true)) { // node was selected
|
|
|
|
|
|
if (selectedNodesCount === previouslySelectedNodeCount && nodesChanges === true) { |
|
|
|
|
|
this.selectionHandler._generateClickEvent('deselectNode', event, pointer, previousSelection); |
|
|
|
|
|
} |
|
|
this.selectionHandler._generateClickEvent('selectNode', event, pointer); |
|
|
this.selectionHandler._generateClickEvent('selectNode', event, pointer); |
|
|
selected = true; |
|
|
selected = true; |
|
|
} |
|
|
} |
|
@ -200,6 +203,9 @@ class InteractionHandler { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
if (selectedEdgesCount - previouslySelectedEdgeCount > 0|| (selectedEdgesCount === previouslySelectedEdgeCount && edgesChanges === true)) { // node was selected
|
|
|
if (selectedEdgesCount - previouslySelectedEdgeCount > 0|| (selectedEdgesCount === previouslySelectedEdgeCount && edgesChanges === true)) { // node was selected
|
|
|
|
|
|
if (selectedEdgesCount === previouslySelectedEdgeCount && edgesChanges === true) { |
|
|
|
|
|
this.selectionHandler._generateClickEvent('deselectEdge', event, pointer, previousSelection); |
|
|
|
|
|
} |
|
|
this.selectionHandler._generateClickEvent('selectEdge', event, pointer); |
|
|
this.selectionHandler._generateClickEvent('selectEdge', event, pointer); |
|
|
selected = true; |
|
|
selected = true; |
|
|
} |
|
|
} |
|
|