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
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.
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