@neo4j-nvl/interaction-handlers
Advanced tools
Comparing version 0.2.17 to 0.2.18
@@ -29,4 +29,2 @@ import { NVL } from '@neo4j-nvl/core'; | ||
export declare class ZoomInteraction extends BaseInteraction<ZoomInteractionCallbacks> { | ||
private MinZoom; | ||
private MaxZoom; | ||
/** | ||
@@ -33,0 +31,0 @@ * Creates a new instance of the zoom interaction handler. |
@@ -24,14 +24,2 @@ import { throttle } from 'lodash'; | ||
super(nvl); | ||
Object.defineProperty(this, "MinZoom", { | ||
enumerable: true, | ||
configurable: true, | ||
writable: true, | ||
value: void 0 | ||
}); | ||
Object.defineProperty(this, "MaxZoom", { | ||
enumerable: true, | ||
configurable: true, | ||
writable: true, | ||
value: void 0 | ||
}); | ||
/** | ||
@@ -57,5 +45,2 @@ * Throttled zoom function to avoid events happening too fast. | ||
const newZoomTarget = zoom - factor * Math.min(1, zoom); | ||
if (newZoomTarget < this.MinZoom || newZoomTarget > this.MaxZoom) { | ||
return; | ||
} | ||
const { offsetX, offsetY } = this.nvlInstance.getMouseElementCoordinates(event); | ||
@@ -88,6 +73,4 @@ const newPanX = x + (offsetX / zoom - offsetX / newZoomTarget); | ||
}); | ||
this.MinZoom = 0.1; | ||
this.MaxZoom = 5; | ||
this.addEventListener('wheel', this.handleWheel); | ||
} | ||
} |
{ | ||
"name": "@neo4j-nvl/interaction-handlers", | ||
"version": "0.2.17", | ||
"version": "0.2.18", | ||
"license": "SEE LICENSE IN 'Neo4j Early Access Agreement - Visualization Library.pdf'", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
269818
1822