@neo4j-nvl/interaction-handlers 0.2.18 → 0.2.19
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.
|
@@ -52,6 +52,7 @@ export declare class PanInteraction extends BaseInteraction<PanInteractionCallba
|
|
|
52
52
|
updateTargets: (targets: Array<'node' | 'relationship'>, excludeNodeMargin: boolean) => void;
|
|
53
53
|
private handleMouseDown;
|
|
54
54
|
private handleMouseMove;
|
|
55
|
+
private handleMouseUp;
|
|
55
56
|
/**
|
|
56
57
|
* Removes the related event listeners from the canvas.
|
|
57
58
|
*/
|
|
@@ -100,12 +100,21 @@ export class PanInteraction extends BaseInteraction {
|
|
|
100
100
|
this.mousePosition = { x: evt.clientX, y: evt.clientY };
|
|
101
101
|
}
|
|
102
102
|
});
|
|
103
|
+
Object.defineProperty(this, "handleMouseUp", {
|
|
104
|
+
enumerable: true,
|
|
105
|
+
configurable: true,
|
|
106
|
+
writable: true,
|
|
107
|
+
value: () => {
|
|
108
|
+
this.shouldPan = false;
|
|
109
|
+
}
|
|
110
|
+
});
|
|
103
111
|
this.mousePosition = { x: 0, y: 0 };
|
|
104
112
|
this.targets = [];
|
|
105
113
|
this.excludeNodeMargin = false;
|
|
106
114
|
this.shouldPan = false;
|
|
107
115
|
this.addEventListener('mousedown', this.handleMouseDown, true);
|
|
108
116
|
this.addEventListener('mousemove', this.handleMouseMove, true);
|
|
117
|
+
this.addEventListener('mouseup', this.handleMouseUp, true);
|
|
109
118
|
}
|
|
110
119
|
/**
|
|
111
120
|
* Removes the related event listeners from the canvas.
|
|
@@ -113,5 +122,6 @@ export class PanInteraction extends BaseInteraction {
|
|
|
113
122
|
destroy() {
|
|
114
123
|
this.removeEventListener('mousedown', this.handleMouseDown, true);
|
|
115
124
|
this.removeEventListener('mousemove', this.handleMouseMove, true);
|
|
125
|
+
this.removeEventListener('mouseup', this.handleMouseUp, true);
|
|
116
126
|
}
|
|
117
127
|
}
|