Skip to content
This repository has been archived by the owner on Aug 1, 2022. It is now read-only.

Event listener to detect drawing on canvas #118

Open
Arp-G opened this issue May 2, 2021 · 1 comment
Open

Event listener to detect drawing on canvas #118

Arp-G opened this issue May 2, 2021 · 1 comment
Labels
enhancement New feature or request

Comments

@Arp-G
Copy link

Arp-G commented May 2, 2021

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

@embiem embiem added the enhancement New feature or request label Nov 7, 2021
@jaxomlotus
Copy link

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants