vispy / jupyter_rfb

Remote Frame Buffer for Jupyter
https://jupyter-rfb.readthedocs.io
MIT License
55 stars 10 forks source link

Wheel event improvements #49

Closed almarklein closed 2 years ago

almarklein commented 2 years ago
djhoese commented 2 years ago

If you aren't customizing the API docs too much you may want to look into sphinx apidoc: https://www.sphinx-doc.org/en/master/man/sphinx-apidoc.html or https://pypi.org/project/sphinxcontrib-apidoc/

Might save you time in the future.

almarklein commented 2 years ago

To prevent the widget from unintentionally consuming wheel events, there are (at least) two options:

  1. Keep track of the object having focus (having been clicked on).
  2. Check if the wheel event originated from over the widget, using a timeout mechanism (a technique I've used in Flexx).

I initially went with (2), see the commit, but then I remembered that we already keep track of focus for key events, so (1) is easy to implement, and that approach also feels more consistent to the user.

almarklein commented 2 years ago

Ready!