-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
refactorA suggestion that could improve the code baseA suggestion that could improve the code base
Description
Instead of having to subtract by a custom variable, you can use offsetX and offsetY from the window element to grab the mouse's position in relation to the canvas. "But that would cause errors whenever the mouse exits the canvas!" Actually, there is already a boolean tracking whether the mouse is hovering over the canvas. It's called isHovering. Simply only draw / append to currentStroke if isHovering === true.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
refactorA suggestion that could improve the code baseA suggestion that could improve the code base