I have added an input handler looking for MOUSE_MOVE events. I am getting the events. However, the only information I am receiving is the position of the cursor. I would like to be able to get the original DOM event which trigger the mouse move because I need to check to see if the mouse button is down.
I can use document.body.matches(':active') to test, but this seems like it is overkill when the information is available in the original event.
But, I am not sure how to get to that original event. Is it possible?
If I am correct, the MOUSE_MOVE input action expects a function that can receive a Cesium.ScreenSpaceEventHandler.MotionEvent. I do not see an event property here and when I try to log an event property, it tells me it is undefined.
Have I missed something? Can you provide a corrected sandcastle?
I am guessing you thought I was referring to Element: mousemove event - Web APIs | MDN, but am not. However, I assume that Cesium is using these Dom events. I just need to be able to get access to the original Dom event. But, I do not see how.
This example concerns itself with rotating a webgl cube, but the core functionality of checking for if a mouse is dragging should satisfy whatever requirements you’re trying to fulfill. Let me know if you have any questions.
Hi @eric-g-97477, if you are wanting to do something with a mouse motion while the button is down, could you use the DRAG events instead? See CameraEventType.