Skip to content

Commit

Permalink
frontend(ViewPort) attempt fix pen issue part 3
Browse files Browse the repository at this point in the history
  • Loading branch information
JackDotJS committed Jul 29, 2024
1 parent 973ce25 commit b3fe7f5
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/renderer/src/components/viewport/ViewPort.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -97,12 +97,14 @@ const ViewPort = (): JSXElement => {
setDrawing(false);
});

window.addEventListener(`pointerout`, (ev: PointerEvent) => {
if (ev.pointerType === `pen`) setDrawing(false);
window.addEventListener(`pointerout`, () => {
// if (ev.pointerType === `pen`) setDrawing(false);
setDrawing(false);
});

window.addEventListener(`pointerleave`, (ev: PointerEvent) => {
if (ev.pointerType === `pen`) setDrawing(false);
window.addEventListener(`pointerleave`, () => {
// if (ev.pointerType === `pen`) setDrawing(false);
setDrawing(false);
});

window.addEventListener(`pointercancel`, () => {
Expand Down

0 comments on commit b3fe7f5

Please sign in to comment.