-
Notifications
You must be signed in to change notification settings - Fork 133
Description
Hi,
Not really an issue, but I am changing the zoom in a webapp using document.body.style.zoom.
Then the image during the drag drop is not correctly positionned.
i divided the coordinates top and left by the zoom factor to recover the correct behavior, like that:
s.left = Math.round((pt.x - _this._imgOffset.x)/document.body.style.zoom) + 'px';
s.top = Math.round((pt.y - _this._imgOffset.y)/document.body.style.zoom) + 'px';
Obviously document.body.style.zoom should be already defined. Warning there is no defaut value, it should be assigned to 1 somewhere else (in another js file for me). I do not know if this is relevant or not, nor if you can handle the fact that document.body.style.zoom may not be defined by the user, but I wanted to share this thought.
(Note that the default behavior of our DragDropTouch functions is working correctly when only classical pinch in/out zoom is used. The issue arise just when using the css zoom).
best
Pierre