Closed astrofrog closed 3 years ago
I am starting from the mouse.ipynb notebook. If I define the interaction as:
mouse.ipynb
interaction = MouseInteraction(x_scale=scales_image['x'], y_scale=scales_image['y'], move_throttle=70, events=['dragmove']) figure.interaction = interaction def on_mouse_msg(interaction, data, buffers): print(data) interaction.on_msg(on_mouse_msg)
then dragmove events don't cause the callback to be called. Instead I need to specify all drag events, i.e.
events = ['dragstart', 'dragmove', 'dragend']
for dragmove events to work. That's the first issue.
dragmove
The second issue is that if I originally set events=['mousemove'], then hover over the image, triggering the callback, and then set:
events=['mousemove']
interaction.events = ['dragend', 'dragmove', 'dragstart']
the callback is not called. This took me a few hours to reproduce as it requires a very specific sequence of events!
I am starting from the
mouse.ipynb
notebook. If I define the interaction as:then dragmove events don't cause the callback to be called. Instead I need to specify all drag events, i.e.
for
dragmove
events to work. That's the first issue.The second issue is that if I originally set
events=['mousemove']
, then hover over the image, triggering the callback, and then set:the callback is not called. This took me a few hours to reproduce as it requires a very specific sequence of events!