react-canvas-draw icon indicating copy to clipboard operation
react-canvas-draw copied to clipboard

Event listener to detect drawing on canvas

Open Arp-G opened this issue 3 years ago • 1 comments

Firstly, thanks for this awesome library.

Currently, we have an onChange listener to detect changes on the canvas but it only gets invoked on mouse up, there are use cases where we need an event listener that gets executed whenever anything is drawn on canvas even without mouse up.

For example, I have a use case where I need to get the canvas data every time something is drawn on the canvas, the event listener should fire whenever a stroke is made on the canvas and should not wait for the mouse up.

If anyone has any idea or can guide me to something like this it would be very helpful, I could also open a PR if needed

Arp-G avatar May 02 '21 19:05 Arp-G

Echoing strong interest in this. If there's an alternative branch with this feature I'd be interested. What I'd like is a call back to get the x,y position of the cursor on every pixel change.

jaxomlotus avatar Jun 23 '22 17:06 jaxomlotus