Skip to content

Commit

Permalink
derp
Browse files Browse the repository at this point in the history
  • Loading branch information
micahg committed Jul 15, 2024
1 parent 068f829 commit 67db93c
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions packages/mui/src/utils/contentworker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -597,22 +597,19 @@ self.onmessage = async (evt) => {
break;
}
case "erase": {
startX = evt.data.x;
startY = evt.data.y;
if (evt.data.buttons === 0) {
// here we don't draw BUT if you look at animateBrush, you'll see that we'll just repaint the
// overlay and then render the translucent brush
if (!recording) {
overlayCtx.fillStyle = GUIDE_FILL;
recording = true;
requestAnimationFrame(animateBrush);
}
// IS this even necessary? I guess if the mouse moves faster than the screen refresh it might cut some
// old frames out of the list
cancelAnimationFrame(_frame);
requestAnimationFrame(animateBrush);
} else if (evt.data.buttons === 1) {
/* nop */
if (recording) {
recording = false;
}
recording = false;
eraseBrush(evt.data.x, evt.data.y, brush);
}
break;
Expand Down

0 comments on commit 67db93c

Please sign in to comment.