About the mouse move event
See original GitHub issueThe example provides an example about how to implement user-self mouse event:
from vedo import *
def onLeftClick(mesh):
printc("Left button pressed on", [mesh], c="g")
def onMiddleClick(mesh):
printc("Middle button pressed on", [mesh], c="y")
def onRightClick(mesh):
printc("Right button pressed on", [mesh], c="r")
vp = Plotter()
vp.load(datadir+"teapot.vtk").c("gold")
vp.mouseLeftClickFunction = onLeftClick
vp.mouseMiddleClickFunction = onMiddleClick
vp.mouseRightClickFunction = onRightClick
printc("Click object to trigger function call", invert=1, box="-")
vp += __doc__
vp.show()
The above code shows the left/middle/right click event. I wonder how to implement the mouse move event?
In addition, the onLeftClick is called by:
plotter::_mouseleft(self, iren, event):
...vedo code
if self.mouseLeftClickFunction:
self.mouseLeftClickFunction(clickedActor)
Actually, the vedo will finish some code, and then call self.mouseLeftClickFunction(clickedActor). If I don’t need the ...vedo code
, I want vedo can directly call my-self onLeftClick
, how can I achieve this purpose? Thank you in advance.
Issue Analytics
- State:
- Created 3 years ago
- Comments:8 (4 by maintainers)
Top Results From Across the Web
onmousemove Event - W3Schools
The onmousemove event occurs when the pointer moves over an element. Mouse Events. Event, Occurs When. onclick, The user clicks on an element....
Read more >How mousemove Event Works in Javascript? - eduCBA
MouseMove is a simple event that is executed when a pointer is moving over or around an element. Mousemove is a javascript event...
Read more >MouseMove event | Microsoft Learn
The MouseMove event applies to forms, controls on a form, and labels. MouseMove events are generated continually as the mouse pointer moves ...
Read more >Mouse events - The Modern JavaScript Tutorial
Mouse event types · mousedown/mouseup: Mouse button is clicked/released over an element. · mouseover/mouseout: Mouse pointer comes over/out from ...
Read more >.mousemove() | jQuery API Documentation
The mousemove event is sent to an element when the mouse pointer moves inside the element. Any HTML element can receive this event....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@marcomusy Really thank you for your very nice reply.
@marcomusy Thank you very much.
vp.interactor.RemoveAllObservers()
is what I want. I can remove all observers, and add what I want. In this way, I can control all the event call back funtion.