mwcraig / ipyevents

A custom widget for returning mouse and keyboard events to Python. Documentation:
https://ipyevents.readthedocs.io/en/latest/index.html
BSD 3-Clause "New" or "Revised" License
112 stars 27 forks source link

Reset an event #48

Closed zerline closed 4 years ago

zerline commented 5 years ago

Hi! Thanks for the good work! In order to suppress all callbacks for a given event, I find no better solution than:

my_click_event._dom_handlers.callbacks.clear()

Should we not benefit on a new method like for ex. Event.reset_callbacks to do that in a more sensible way?

mwcraig commented 5 years ago

That is an excellent idea -- if you are interested in opening a PR that would be great, otherwise I'll try to add something like that in the next week or two.

zerline commented 4 years ago

Anyways ..