Mouse events with graph-tool
Hi, we are building an interactive graph and want to implement some mouse events. We found the example: https://graph-tool.skewed.de/static/doc/demos/animation/animation.html , but we still struggle. Is there an easier way then making a subclass? Like " give the draw function a self written mouse_listener as argument" ? Thanks for help! Oliver -- Sent from: http://main-discussion-list-for-the-graph-tool-project.982480.n3.nabble.com/
Am 26.10.18 um 19:57 schrieb oliver_p:
we are building an interactive graph and want to implement some mouse events. We found the example: https://graph-tool.skewed.de/static/doc/demos/animation/animation.html , but we still struggle. Is there an easier way then making a subclass? Like " give the draw function a self written mouse_listener as argument" ?
No, that would require allowing every possible override via parameter arguments, which would clutter the code tremendously. The proper way to do this is to subclass, which a lot more elegant, and does the job. Best, Tiago -- Tiago de Paula Peixoto <tiago@skewed.de>
participants (2)
-
oliver_p -
Tiago de Paula Peixoto