Skip to content

Commit

Permalink
Fix staying text cursor after changing mode
Browse files Browse the repository at this point in the history
  • Loading branch information
roman-drozd-it committed Jul 15, 2024
1 parent 1884fb3 commit 5370e0f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/components/drawing/DrawingBoard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ const DrawingBoard: React.FC = () => {
canvas.freeDrawingCursor = `url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="10" height="10" fill="${color}"><circle cx="${size}" cy="${size}" r="${size}"/></svg>') 5 5, auto`;
canvas.isDrawingMode = true;
canvas.selection = false;
canvas.off('mouse:down');

setMode('brush');
}
Expand All @@ -126,6 +127,7 @@ const DrawingBoard: React.FC = () => {
canvas.freeDrawingCursor = `url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="10" height="10" fill="transparent" stroke="black" stroke-width="1"><circle cx="${size}" cy="${size}" r="${size}"/></svg>') 5 5, auto`;
canvas.isDrawingMode = true;
canvas.selection = false;
canvas.off('mouse:down');

setMode('eraser');
}
Expand Down

0 comments on commit 5370e0f

Please sign in to comment.