From 874a2cb54744198fa67a8a8e3eaaa30de6ffdf3f Mon Sep 17 00:00:00 2001 From: Taha Shashtari Date: Wed, 28 Aug 2024 19:10:15 +0300 Subject: [PATCH] fix DragEventPlugin initial pointer --- src/builtin-plugins/DragEventPlugin.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/builtin-plugins/DragEventPlugin.ts b/src/builtin-plugins/DragEventPlugin.ts index 549e46b..d5e70c9 100644 --- a/src/builtin-plugins/DragEventPlugin.ts +++ b/src/builtin-plugins/DragEventPlugin.ts @@ -91,8 +91,8 @@ export class DragEventPlugin extends EventPlugin { this._pointerDownPerView.set(view.id, view.intersects(x, y)) this._targetPerView.set(view.id, target) const initialPointer = new Vec2( - x - view.position.x, - y - view.position.y + x - view.position.initialX, + y - view.position.initialY ) this._pointerX = x this._pointerY = y