You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Mar 6, 2024. It is now read-only.
If the canvas element suffers some modifications inside the window, such as translations via style properties (margin, top, left), all the touch events will work incorrectly. The following seems to fix it:
The following method doesn't take into account the coordinates of the canvas element inside the window.
__proto.initEvent=function(e,nativeEvent) //line 2989 laya.core.js
If the canvas element suffers some modifications inside the window, such as translations via style properties (margin, top, left), all the touch events will work incorrectly. The following seems to fix it:
const canvas = Laya.Render._$GET_canvas()
const rect = canvas.getBoundingClientRect()
this._point.setTo(e.pageX - rect.left || e.clientX - rect.left, e.clientY - rect.top || e.pageY - rect.top)
The text was updated successfully, but these errors were encountered: