Skip to content

Commit 0607f32

Browse files
committed
fix(mover): Pass drag delta to dragger.onDrag in pixels
Fixes #446
1 parent 979ef10 commit 0607f32

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
@@ -301,7 +301,7 @@ export class Mover {
301301

302302
info.dragger.onDrag(
303303
info.fakePointerEvent('pointermove', direction),
304-
info.totalDelta,
304+
info.totalDelta.clone().scale(workspace.scale),
305305
);
306306

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

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

0 commit comments

Comments
 (0)