Content-Length: 294456 | pFad | https://github.com/fastplotlib/fastplotlib/issues/456

38 events refactor · Issue #456 · fastplotlib/fastplotlib · GitHub
Skip to content

events refactor #456

Closed
Closed
@kushalkolar

Description

@kushalkolar

From today's meeting, superseeds #345, #182, #100. Much of the ideas from those issues either belong in examples or a neuro-widget library @clewis7

  1. I think we will keep a very simple event system in fastplotlib. I will explore observ and see whether it makes sense to incorporate it within fastplotlib or not. Otherwise we will make a very simple event system in fastplotlib and give users examples of how to use observ or other libs for more complex event handling
  2. Using what Almar and Korijn call a store model is probably a better paradigm than circular events when those types of interactions are required. Have a concept of a "state", for example "selected cell" and events modify that state. This way you don't have to worry about circular events. For example, if you click on a cell it modifies "selected cell", if you click on a temporal component it modifies "selected cell" etc.
  3. Pull out the Interaction class from fastplotlib and put it into a new neurowidgets that Caitlin will work on.

Proposed basic API for adding event handlers suggested by Almar:

graphic.add_event_handler("feature", callable)

# could also be a pygfx event and use the same API?
graphic.add_event_handler("click", callable)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions









      ApplySandwichStrip

      pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


      --- a PPN by Garber Painting Akron. With Image Size Reduction included!

      Fetched URL: https://github.com/fastplotlib/fastplotlib/issues/456

      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy