Skip to content

Commit

Permalink
Merge pull request #52 from deco-finter/fix/cursor-jump-pointerup
Browse files Browse the repository at this point in the history
[FAB-127] Fix cursor jump onPointerUp via touch
  • Loading branch information
daystram committed Sep 25, 2021
2 parents 8dd9ddd + c18680b commit 55905b8
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions fableous-fe/src/components/canvas/Canvas.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -743,6 +743,9 @@ const Canvas = forwardRef<ImperativeCanvasRef, CanvasProps>(
case ToolMode.Paint:
if (dragging) {
placePaint(lastX, lastY, x, y, toolColor, toolWidth);
const [normX, normY] = scaleDownXY(canvasRef, x, y);
const [normWidth] = scaleDownXY(canvasRef, toolWidth, 0);
placeCursor(normX, normY, normWidth, toolMode);
placeCheckpoint(toolMode);
}
break;
Expand Down

0 comments on commit 55905b8

Please sign in to comment.