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

Store listener cache outside of model #16

Closed mwcraig closed 6 years ago

mwcraig commented 6 years ago

This change avoids a circular reference that is an issue if you try to save the model to the backend. _attached_listeners contained a reference to a function in which this was bound to EventModel, so trying to serialize EventModel threw an error.

Necessary for an incoming PR to add an xy trait.

This is straightforward enough that I'll merge it without review if local testing looks good...