@neo4j-nvl/interaction-handlers 2.0.0 → 2.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +25 -1
- package/README.md +8 -0
- package/lib/constants.d.ts +1 -1
- package/lib/constants.js +4 -2
- package/lib/index.d.ts +10 -20
- package/lib/index.js +10 -10
- package/lib/interaction-handlers/base.d.ts +67 -67
- package/lib/interaction-handlers/base.js +98 -104
- package/lib/interaction-handlers/box-select-interaction.d.ts +44 -44
- package/lib/interaction-handlers/box-select-interaction.js +133 -127
- package/lib/interaction-handlers/click-interaction.d.ts +111 -111
- package/lib/interaction-handlers/click-interaction.js +116 -131
- package/lib/interaction-handlers/drag-node-interaction.d.ts +40 -40
- package/lib/interaction-handlers/drag-node-interaction.js +102 -111
- package/lib/interaction-handlers/draw-interaction.d.ts +37 -37
- package/lib/interaction-handlers/draw-interaction.js +245 -278
- package/lib/interaction-handlers/hover-interaction.d.ts +34 -30
- package/lib/interaction-handlers/hover-interaction.js +83 -89
- package/lib/interaction-handlers/keyboard-interaction.d.ts +149 -97
- package/lib/interaction-handlers/keyboard-interaction.js +255 -201
- package/lib/interaction-handlers/lasso-interaction.d.ts +45 -45
- package/lib/interaction-handlers/lasso-interaction.js +174 -196
- package/lib/interaction-handlers/pan-interaction.d.ts +62 -61
- package/lib/interaction-handlers/pan-interaction.js +111 -100
- package/lib/interaction-handlers/utils.d.ts +2 -2
- package/lib/interaction-handlers/utils.js +39 -38
- package/lib/interaction-handlers/zoom-interaction.d.ts +52 -48
- package/lib/interaction-handlers/zoom-interaction.js +73 -71
- package/lib/overlay-renderer/overlay-renderer.d.ts +13 -13
- package/lib/overlay-renderer/overlay-renderer.js +96 -111
- package/package.json +19 -6
- package/lib/__tests__/box-select-interaction.test.d.ts +0 -1
- package/lib/__tests__/box-select-interaction.test.js +0 -149
- package/lib/__tests__/click-interaction.test.d.ts +0 -1
- package/lib/__tests__/click-interaction.test.js +0 -505
- package/lib/__tests__/drag-node-interaction.test.d.ts +0 -1
- package/lib/__tests__/drag-node-interaction.test.js +0 -247
- package/lib/__tests__/hover-interaction.test.d.ts +0 -1
- package/lib/__tests__/hover-interaction.test.js +0 -374
- package/lib/__tests__/keyboard-interaction.test.d.ts +0 -1
- package/lib/__tests__/keyboard-interaction.test.js +0 -322
- package/lib/__tests__/lasso-interaction.test.d.ts +0 -1
- package/lib/__tests__/lasso-interaction.test.js +0 -219
- package/lib/__tests__/pan-interaction.test.d.ts +0 -1
- package/lib/__tests__/pan-interaction.test.js +0 -223
- package/lib/__tests__/utils.test.d.ts +0 -1
- package/lib/__tests__/utils.test.js +0 -19
- package/lib/__tests__/zoom-interaction.test.d.ts +0 -1
- package/lib/__tests__/zoom-interaction.test.js +0 -185
|
@@ -1,128 +1,134 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { OverlayRenderer } from
|
|
3
|
-
import { BaseInteraction } from
|
|
4
|
-
import { getCanvasPosition, getWorldPosition, isDraggingMovement } from
|
|
1
|
+
import "../constants.js";
|
|
2
|
+
import { OverlayRenderer } from "../overlay-renderer/overlay-renderer.js";
|
|
3
|
+
import { BaseInteraction } from "./base.js";
|
|
4
|
+
import { getCanvasPosition, getWorldPosition, isDraggingMovement } from "./utils.js";
|
|
5
|
+
// src/interaction-handlers/box-select-interaction.ts
|
|
5
6
|
/**
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
}
|
|
7
|
+
* An interaction handler for multi-selecting nodes and relationships.
|
|
8
|
+
* When dragging the cursor, it draws a box on the scene and all nodes and relationships inside the box are selected.
|
|
9
|
+
*
|
|
10
|
+
* For examples, head to the {@link https://neo4j.com/docs/nvl/current/interaction-handlers/#_boxselectinteraction Box Select Interaction documentation page}.
|
|
11
|
+
*/
|
|
12
|
+
var BoxSelectInteraction = class extends BaseInteraction {
|
|
13
|
+
mousePosition = {
|
|
14
|
+
x: 0,
|
|
15
|
+
y: 0
|
|
16
|
+
};
|
|
17
|
+
startWorldPosition = {
|
|
18
|
+
x: 0,
|
|
19
|
+
y: 0
|
|
20
|
+
};
|
|
21
|
+
startClientPosition = {
|
|
22
|
+
x: 0,
|
|
23
|
+
y: 0
|
|
24
|
+
};
|
|
25
|
+
overlayRenderer;
|
|
26
|
+
isBoxSelecting = false;
|
|
27
|
+
boxSelectPending = false;
|
|
28
|
+
/**
|
|
29
|
+
* Creates a new instance of the multi-select interaction handler.
|
|
30
|
+
* @param nvl - The NVL instance to attach the interaction handler to.
|
|
31
|
+
* @param options - Options for the multi-select interaction handler to customize its behavior.
|
|
32
|
+
*/
|
|
33
|
+
constructor(nvl, options = { selectOnRelease: false }) {
|
|
34
|
+
super(nvl, options);
|
|
35
|
+
this.overlayRenderer = new OverlayRenderer(this.containerInstance);
|
|
36
|
+
this.addEventListener("mousedown", this.handleMouseDown, true);
|
|
37
|
+
this.addEventListener("mousemove", this.handleDrag, true);
|
|
38
|
+
this.addEventListener("mouseup", this.endBoxSelect, true);
|
|
39
|
+
}
|
|
40
|
+
handleMouseDown = (event) => {
|
|
41
|
+
if (event.button !== 0) {
|
|
42
|
+
this.isBoxSelecting = false;
|
|
43
|
+
this.boxSelectPending = false;
|
|
44
|
+
return;
|
|
45
|
+
}
|
|
46
|
+
this.turnOnBoxSelect(event);
|
|
47
|
+
};
|
|
48
|
+
handleDrag = (event) => {
|
|
49
|
+
if (this.isBoxSelecting) {
|
|
50
|
+
const curPos = getCanvasPosition(this.containerInstance, event);
|
|
51
|
+
this.overlayRenderer.drawBox(this.mousePosition.x, this.mousePosition.y, curPos.x, curPos.y);
|
|
52
|
+
return;
|
|
53
|
+
}
|
|
54
|
+
if (this.boxSelectPending && event.buttons === 1) {
|
|
55
|
+
if (isDraggingMovement(event, this.startClientPosition)) this.activateBoxSelect(event);
|
|
56
|
+
}
|
|
57
|
+
};
|
|
58
|
+
getHitsInBox = (startPos, endPos) => {
|
|
59
|
+
const inside = (pos, start, end) => {
|
|
60
|
+
const minX = Math.min(start.x, end.x);
|
|
61
|
+
const maxX = Math.max(start.x, end.x);
|
|
62
|
+
const minY = Math.min(start.y, end.y);
|
|
63
|
+
const maxY = Math.max(start.y, end.y);
|
|
64
|
+
return pos.x >= minX && pos.x <= maxX && pos.y >= minY && pos.y <= maxY;
|
|
65
|
+
};
|
|
66
|
+
const positions = this.nvlInstance.getNodePositions();
|
|
67
|
+
const hitNodes = /* @__PURE__ */ new Set();
|
|
68
|
+
for (const pos of positions) if (inside(pos, startPos, endPos)) hitNodes.add(pos.id);
|
|
69
|
+
const rels = this.nvlInstance.getRelationships();
|
|
70
|
+
const hitRels = [];
|
|
71
|
+
for (const rel of rels) if (hitNodes.has(rel.from) && hitNodes.has(rel.to)) hitRels.push(rel);
|
|
72
|
+
return {
|
|
73
|
+
nodes: Array.from(hitNodes).map((id) => this.nvlInstance.getNodeById(id)),
|
|
74
|
+
rels: hitRels
|
|
75
|
+
};
|
|
76
|
+
};
|
|
77
|
+
endBoxSelect = (event) => {
|
|
78
|
+
if (!this.isBoxSelecting) {
|
|
79
|
+
this.boxSelectPending = false;
|
|
80
|
+
return;
|
|
81
|
+
}
|
|
82
|
+
this.isBoxSelecting = false;
|
|
83
|
+
this.overlayRenderer.clear();
|
|
84
|
+
const endPosition = getCanvasPosition(this.containerInstance, event);
|
|
85
|
+
const endWorldPosition = getWorldPosition(this.nvlInstance, endPosition);
|
|
86
|
+
const { nodes, rels } = this.getHitsInBox(this.startWorldPosition, endWorldPosition);
|
|
87
|
+
if (this.currentOptions.selectOnRelease === true) this.nvlInstance.updateElementsInGraph(nodes.map((node) => ({
|
|
88
|
+
id: node.id,
|
|
89
|
+
selected: true
|
|
90
|
+
})), rels.map((rel) => ({
|
|
91
|
+
id: rel.id,
|
|
92
|
+
selected: true
|
|
93
|
+
})));
|
|
94
|
+
this.callCallbackIfRegistered("onBoxSelect", {
|
|
95
|
+
nodes,
|
|
96
|
+
rels
|
|
97
|
+
}, event);
|
|
98
|
+
this.toggleGlobalTextSelection(true, this.endBoxSelect);
|
|
99
|
+
};
|
|
100
|
+
/**
|
|
101
|
+
* Removes all related event listeners and the overlay renderer for the box.
|
|
102
|
+
*/
|
|
103
|
+
destroy() {
|
|
104
|
+
this.toggleGlobalTextSelection(true, this.endBoxSelect);
|
|
105
|
+
this.removeEventListener("mousedown", this.handleMouseDown, true);
|
|
106
|
+
this.removeEventListener("mousemove", this.handleDrag, true);
|
|
107
|
+
this.removeEventListener("mouseup", this.endBoxSelect, true);
|
|
108
|
+
this.overlayRenderer.destroy();
|
|
109
|
+
}
|
|
110
|
+
activateBoxSelect = (event) => {
|
|
111
|
+
this.boxSelectPending = false;
|
|
112
|
+
this.isBoxSelecting = true;
|
|
113
|
+
this.toggleGlobalTextSelection(false, this.endBoxSelect);
|
|
114
|
+
this.callCallbackIfRegistered("onBoxStarted", event);
|
|
115
|
+
if (this.currentOptions.selectOnRelease === true) this.nvlInstance.deselectAll();
|
|
116
|
+
const curPos = getCanvasPosition(this.containerInstance, event);
|
|
117
|
+
this.overlayRenderer.drawBox(this.mousePosition.x, this.mousePosition.y, curPos.x, curPos.y);
|
|
118
|
+
};
|
|
119
|
+
turnOnBoxSelect(event) {
|
|
120
|
+
this.mousePosition = getCanvasPosition(this.containerInstance, event);
|
|
121
|
+
this.startWorldPosition = getWorldPosition(this.nvlInstance, this.mousePosition);
|
|
122
|
+
if (this.nvlInstance.getHits(event, ["node"], { hitNodeMarginWidth: 10 }).nvlTargets.nodes.length > 0) {
|
|
123
|
+
this.isBoxSelecting = false;
|
|
124
|
+
this.boxSelectPending = false;
|
|
125
|
+
} else {
|
|
126
|
+
this.startClientPosition = {
|
|
127
|
+
x: event.clientX,
|
|
128
|
+
y: event.clientY
|
|
129
|
+
};
|
|
130
|
+
this.boxSelectPending = true;
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
};
|
|
134
|
+
export { BoxSelectInteraction };
|
|
@@ -1,98 +1,98 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
1
|
+
import { BaseInteraction } from "./base.js";
|
|
2
|
+
import { Cluster, HitTargets, NVL, Node, Relationship } from "@neo4j-nvl/base";
|
|
3
3
|
/**
|
|
4
4
|
* Options for the click interaction handler to customize its behavior.
|
|
5
5
|
*/
|
|
6
6
|
export type ClickInteractionOptions = {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
7
|
+
/**
|
|
8
|
+
* Whether to select the node, relationship, or cluster members on click.
|
|
9
|
+
* Clicking something that is already selected clears the selection.
|
|
10
|
+
* @defaultValue false
|
|
11
|
+
*/
|
|
12
|
+
selectOnClick?: boolean;
|
|
13
13
|
};
|
|
14
14
|
/**
|
|
15
15
|
* Callbacks for the click interaction handler.
|
|
16
16
|
*/
|
|
17
17
|
export type ClickInteractionCallbacks = {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
18
|
+
/**
|
|
19
|
+
* Called when a node is clicked.
|
|
20
|
+
* @param node - The node that was clicked.
|
|
21
|
+
* @param hitElements - All elements that were hit by the click.
|
|
22
|
+
* @param event - The original mouse event.
|
|
23
|
+
*/
|
|
24
|
+
onNodeClick?: ((node: Node, hitElements: HitTargets, event: MouseEvent) => void) | boolean;
|
|
25
|
+
/**
|
|
26
|
+
* Called when a relationship is clicked.
|
|
27
|
+
* @param relationship - The relationship that was clicked.
|
|
28
|
+
* @param hitElements - All elements that were hit by the click.
|
|
29
|
+
* @param event - The original mouse event.
|
|
30
|
+
*/
|
|
31
|
+
onRelationshipClick?: ((relationship: Relationship, hitElements: HitTargets, event: MouseEvent) => void) | boolean;
|
|
32
|
+
/**
|
|
33
|
+
* Called when a cluster hull is clicked (empty space inside a clusterBy hull).
|
|
34
|
+
* @param cluster - The cluster that was clicked.
|
|
35
|
+
* @param hitElements - All elements that were hit by the click.
|
|
36
|
+
* @param event - The original mouse event.
|
|
37
|
+
*/
|
|
38
|
+
onClusterClick?: ((cluster: Cluster, hitElements: HitTargets, event: MouseEvent) => void) | boolean;
|
|
39
|
+
/**
|
|
40
|
+
* Called when the canvas is clicked.
|
|
41
|
+
* @param event - The original mouse event.
|
|
42
|
+
*/
|
|
43
|
+
onCanvasClick?: ((event: MouseEvent) => void) | boolean;
|
|
44
|
+
/**
|
|
45
|
+
* Called when the canvas is double-clicked.
|
|
46
|
+
* @param event - The original mouse event.
|
|
47
|
+
*/
|
|
48
|
+
onCanvasDoubleClick?: ((event: MouseEvent) => void) | boolean;
|
|
49
|
+
/**
|
|
50
|
+
* Called when the canvas is right-clicked.
|
|
51
|
+
* @param event - The original mouse event.
|
|
52
|
+
*/
|
|
53
|
+
onCanvasRightClick?: ((event: MouseEvent) => void) | boolean;
|
|
54
|
+
/**
|
|
55
|
+
* Called when a node is double-clicked.
|
|
56
|
+
* @param node - The node that was double-clicked.
|
|
57
|
+
* @param hitElements - All elements that were hit by the double-click.
|
|
58
|
+
* @param event - The original mouse event.
|
|
59
|
+
*/
|
|
60
|
+
onNodeDoubleClick?: ((node: Node, hitElements: HitTargets, event: MouseEvent) => void) | boolean;
|
|
61
|
+
/**
|
|
62
|
+
* Called when a node is right-clicked.
|
|
63
|
+
* @param node - The node that was right-clicked.
|
|
64
|
+
* @param hitElements - All elements that were hit by the right-click.
|
|
65
|
+
* @param event - The original mouse event.
|
|
66
|
+
*/
|
|
67
|
+
onNodeRightClick?: ((node: Node, hitElements: HitTargets, event: MouseEvent) => void) | boolean;
|
|
68
|
+
/**
|
|
69
|
+
* Called when a relationship is double-clicked.
|
|
70
|
+
* @param relationship - The relationship that was double-clicked.
|
|
71
|
+
* @param hitElements - All elements that were hit by the double-click.
|
|
72
|
+
* @param event - The original mouse event.
|
|
73
|
+
*/
|
|
74
|
+
onRelationshipDoubleClick?: ((relationship: Relationship, hitElements: HitTargets, event: MouseEvent) => void) | boolean;
|
|
75
|
+
/**
|
|
76
|
+
* Called when a relationship is right-clicked.
|
|
77
|
+
* @param relationship - The relationship that was right-clicked.
|
|
78
|
+
* @param hitElements - All elements that were hit by the right-click.
|
|
79
|
+
* @param event - The original mouse event.
|
|
80
|
+
*/
|
|
81
|
+
onRelationshipRightClick?: ((relationship: Relationship, hitElements: HitTargets, event: MouseEvent) => void) | boolean;
|
|
82
|
+
/**
|
|
83
|
+
* Called when a cluster hull is double-clicked.
|
|
84
|
+
* @param cluster - The cluster that was double-clicked.
|
|
85
|
+
* @param hitElements - All elements that were hit by the double-click.
|
|
86
|
+
* @param event - The original mouse event.
|
|
87
|
+
*/
|
|
88
|
+
onClusterDoubleClick?: ((cluster: Cluster, hitElements: HitTargets, event: MouseEvent) => void) | boolean;
|
|
89
|
+
/**
|
|
90
|
+
* Called when a cluster hull is right-clicked.
|
|
91
|
+
* @param cluster - The cluster that was right-clicked.
|
|
92
|
+
* @param hitElements - All elements that were hit by the right-click.
|
|
93
|
+
* @param event - The original mouse event.
|
|
94
|
+
*/
|
|
95
|
+
onClusterRightClick?: ((cluster: Cluster, hitElements: HitTargets, event: MouseEvent) => void) | boolean;
|
|
96
96
|
};
|
|
97
97
|
/**
|
|
98
98
|
* Click interaction handler that handles click, double click and right click events on
|
|
@@ -101,28 +101,28 @@ export type ClickInteractionCallbacks = {
|
|
|
101
101
|
* For examples, head to the {@link https://neo4j.com/docs/nvl/current/interaction-handlers/#_clickinteraction Click Interaction documentation page}.
|
|
102
102
|
*/
|
|
103
103
|
export declare class ClickInteraction extends BaseInteraction<ClickInteractionOptions> {
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
}
|
|
104
|
+
private moved;
|
|
105
|
+
private mousePosition;
|
|
106
|
+
/**
|
|
107
|
+
* Creates a new click interaction handler.
|
|
108
|
+
* @param nvl - The NVL instance to attach the interaction handler to.
|
|
109
|
+
* @param options - Options for the click interaction handler.
|
|
110
|
+
*/
|
|
111
|
+
constructor(nvl: NVL, options?: ClickInteractionOptions);
|
|
112
|
+
private handleMouseDown;
|
|
113
|
+
private handleRightClick;
|
|
114
|
+
private handleDoubleClick;
|
|
115
|
+
private handleClick;
|
|
116
|
+
/**
|
|
117
|
+
* Makes the given elements the entire selection, deselecting everything else.
|
|
118
|
+
*
|
|
119
|
+
* Clicking something that is already fully selected clears the selection instead, so a repeated
|
|
120
|
+
* click toggles it off. A cluster counts as selected once all of its members are, which keeps
|
|
121
|
+
* cluster clicks behaving like node and relationship clicks.
|
|
122
|
+
*/
|
|
123
|
+
private setSelection;
|
|
124
|
+
/**
|
|
125
|
+
* Removes all related event listeners from the container.
|
|
126
|
+
*/
|
|
127
|
+
destroy: () => void;
|
|
128
|
+
}
|