dfki-asr / compass

Collaborative Modular Prototyping And Simulation Server
Apache License 2.0
2 stars 0 forks source link

Mouse Release Select in Inspect Mode #8

Open gdemme opened 9 years ago

gdemme commented 9 years ago

Description: Mouse Button release selects the underlying object

Reconstruction: – In Inspect mode – Rotate scene – Release mouse, when over an object, the object gets selected

Hint: This seems to be correct behavior for flight mode. But not in inspect. Object selection should not happen after mouse drag.

wherget commented 9 years ago

tl;dr: We know, and this is very hard to fix.

From my point of view, a true fix for this would require the development (or integration) of a rather sophisticated mouse event tracking and interception system.

This is, well, by constraint, rather than by design. The root of this issue stems from the fact that the browser enforces the firing of a "click" event whenever it sees "mousedown" and "mouseup" in that order, completely independent of mouse movement in between those two. This behaviour is, in fact, a security "feature", preventing malicious scripts from intercepting events relevant to the interaction with websites.

In general, with mouse handling in single-page apps, there's a lot of corner cases, a few of them outlined here: http://www.quirksmode.org/js/events_mouse.html COMPASS' specific combination of JSF/Primefaces and XML3D probably complicates a fix further, as I expect each of them adds their own bunch of corner cases one would have to keep track of.

We shall investaigate when we have time, as the full extent of what is needed to fix this is not clear to me at the moment. Thank you for your report and sorry for the inconvenience.

gdemme commented 9 years ago

Okay, I see this is a hard one.

Maybe one solution could be to separate scene rotation and selection. E.g. have selection on mouse click and have rotation on Shift click?

wherget commented 9 years ago

Seeing as we want to improve scene navigation using the mouse soon-ish anyway, we might test such a behaviour then. I can't guarantee a timeframe yet, but will update this issue as we progress.