Skip to content

Commit 1bff92b

Browse files
committed
fix(Mover): Pass drag delta to dragger.onDrag in pixels
Fixes #446
1 parent e3f533a commit 1bff92b

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/actions/mover.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,7 @@ export class Mover {
302302

303303
info.dragger.onDrag(
304304
info.fakePointerEvent('pointermove', direction),
305-
info.totalDelta,
305+
info.totalDelta.clone().scale(workspace.scale),
306306
);
307307

308308
info.updateTotalDelta();
@@ -327,7 +327,10 @@ export class Mover {
327327
info.totalDelta.x += x * UNCONSTRAINED_MOVE_DISTANCE * workspace.scale;
328328
info.totalDelta.y += y * UNCONSTRAINED_MOVE_DISTANCE * workspace.scale;
329329

330-
info.dragger.onDrag(info.fakePointerEvent('pointermove'), info.totalDelta);
330+
info.dragger.onDrag(
331+
info.fakePointerEvent('pointermove'),
332+
info.totalDelta.clone().scale(workspace.scale),
333+
);
331334
this.scrollCurrentBlockIntoView(workspace);
332335
return true;
333336
}

0 commit comments

Comments
 (0)