ui: take localZoom into account for all drag events

This commit is contained in:
jean-emmanuel 2022-10-29 19:02:05 +02:00
parent 94ffd52215
commit f427f2ecaf
2 changed files with 5 additions and 5 deletions

View file

@ -1,4 +1,5 @@
const Touch = window.Touch || class Touch {}
const zoom = require('../ui/zoom')
// const cssTransformCoords = require('./transform-coords')
@ -17,8 +18,8 @@ module.exports = {
pageY: e.pageY,
clientX: e.clientX,
clientY: e.clientY,
movementX: e.movementX,
movementY: e.movementY,
movementX: e.movementX / zoom.localZoom,
movementY: e.movementY / zoom.localZoom,
pointerId: e.pointerId,
pointerType: e.pointerType,
button: e.button,