@krainovsd/graph 0.14.0-beta.5 → 0.14.0-beta.6
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/lib/cjs/index.cjs
CHANGED
|
@@ -3250,8 +3250,13 @@ class GraphCanvas {
|
|
|
3250
3250
|
let localX;
|
|
3251
3251
|
let localY;
|
|
3252
3252
|
if ("offsetX" in event) {
|
|
3253
|
-
localX = event.offsetX;
|
|
3254
|
-
localY = event.offsetY;
|
|
3253
|
+
// localX = event.offsetX;
|
|
3254
|
+
// localY = event.offsetY;
|
|
3255
|
+
const rect = this.areaRect;
|
|
3256
|
+
if (!rect)
|
|
3257
|
+
return [0, 0];
|
|
3258
|
+
localX = event.clientX - rect.left;
|
|
3259
|
+
localY = event.clientY - rect.top;
|
|
3255
3260
|
}
|
|
3256
3261
|
else {
|
|
3257
3262
|
const rect = this.areaRect;
|