Skip to content

Commit

Permalink
fix(std): add two deltas constants
Browse files Browse the repository at this point in the history
  • Loading branch information
Nikita Minaev committed Dec 5, 2024
1 parent 816367c commit 117eba0
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -224,9 +224,9 @@ export class EdgelessRootBlockComponent extends BlockComponent<
const [p1, p2] = multiPointersState.pointers;

const dx =
(0.5 * (p1.delta.x + p2.delta.x)) / viewport.zoom / viewport.scale;
(0.25 * (p1.delta.x + p2.delta.x)) / viewport.zoom / viewport.scale;
const dy =
(0.5 * (p1.delta.y + p2.delta.y)) / viewport.zoom / viewport.scale;
(0.25 * (p1.delta.y + p2.delta.y)) / viewport.zoom / viewport.scale;

// direction is opposite
viewport.applyDeltaCenter(-dx, -dy);
Expand Down

0 comments on commit 117eba0

Please sign in to comment.