Open Paupy opened 10 years ago
If the element or his parent is in position: fixed, the rotation doesn't work fine when you scroll. For fix, you have to use clientX and clientY here instead of pageX and pageY:
p.onRotated = function (event) { if (this.active === true) { event.stopPropagation(); event.preventDefault(); if (event.touches !== undefined && event.touches[0] !== undefined) { this.lastMouseEvent = { pageX: event.touches[0].clientX, pageY: event.touches[0].clientY } } else { this.lastMouseEvent = { pageX: event.clientX, pageY: event.clientY } } } }
Hi, sorry for late answer and thanks for the fix proposed, will check and add it asap, you may create a pull request if possible
If the element or his parent is in position: fixed, the rotation doesn't work fine when you scroll. For fix, you have to use clientX and clientY here instead of pageX and pageY: