@neo4j-nvl/interaction-handlers 0.2.16 → 0.2.18

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.
@@ -26,8 +26,6 @@ export type ZoomInteractionCallbacks = {
26
26
  * ```
27
27
  */
28
28
  export declare class ZoomInteraction extends BaseInteraction<ZoomInteractionCallbacks> {
29
- private MinZoom;
30
- private MaxZoom;
31
29
  /**
32
30
  * Creates a new instance of the zoom interaction handler.
33
31
  * @param nvl - The NVL instance to attach the interaction handler to
@@ -21,18 +21,6 @@ export class ZoomInteraction extends BaseInteraction {
21
21
  */
22
22
  constructor(nvl) {
23
23
  super(nvl);
24
- Object.defineProperty(this, "MinZoom", {
25
- enumerable: true,
26
- configurable: true,
27
- writable: true,
28
- value: void 0
29
- });
30
- Object.defineProperty(this, "MaxZoom", {
31
- enumerable: true,
32
- configurable: true,
33
- writable: true,
34
- value: void 0
35
- });
36
24
  /**
37
25
  * Throttled zoom function to avoid events happening too fast.
38
26
  * @param event - The original mouse wheel event
@@ -53,9 +41,6 @@ export class ZoomInteraction extends BaseInteraction {
53
41
  const { x, y } = this.nvlInstance.getPan();
54
42
  const factor = event.deltaY / 500;
55
43
  const newZoomTarget = zoom - factor * Math.min(1, zoom);
56
- if (newZoomTarget < this.MinZoom || newZoomTarget > this.MaxZoom) {
57
- return;
58
- }
59
44
  const { offsetX, offsetY } = this.nvlInstance.getMouseElementCoordinates(event);
60
45
  const newPanX = x + (offsetX / zoom - offsetX / newZoomTarget);
61
46
  const newPanY = y + (offsetY / zoom - offsetY / newZoomTarget);
@@ -83,8 +68,6 @@ export class ZoomInteraction extends BaseInteraction {
83
68
  this.removeEventListener('wheel', this.handleWheel);
84
69
  }
85
70
  });
86
- this.MinZoom = 0.1;
87
- this.MaxZoom = 5;
88
71
  this.addEventListener('wheel', this.handleWheel);
89
72
  }
90
73
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@neo4j-nvl/interaction-handlers",
3
- "version": "0.2.16",
3
+ "version": "0.2.18",
4
4
  "license": "SEE LICENSE IN 'Neo4j Early Access Agreement - Visualization Library.pdf'",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",