Apply changes for v11 compatibility (#277)

This commit is contained in:
pkonshik
2023-06-11 14:17:36 +03:00
committed by GitHub
parent d08416777b
commit 9af692566c
4 changed files with 20 additions and 15 deletions
+3 -3
View File
@@ -133,8 +133,8 @@ export function onMouseMove(event) {
// Extract event data
const destination = {
x: event.data.destination.x + this.rulerOffset.x,
y: event.data.destination.y + this.rulerOffset.y,
x: event.interactionData.destination.x + this.rulerOffset.x,
y: event.interactionData.destination.y + this.rulerOffset.y,
};
// Hide any existing Token HUD
@@ -148,7 +148,7 @@ export function onMouseMove(event) {
function scheduleMeasurement(destination, event) {
const measurementInterval = 50;
const mt = event._measureTime || 0;
const originalEvent = event.data.originalEvent;
const originalEvent = event.interactionData.originalEvent;
if (Date.now() - mt > measurementInterval) {
this.measure(destination, {snap: !disableSnap});
event._measureTime = Date.now();