Open Fredosixx opened 5 years ago
Does returning false
from the onMouseMove
and / or onMouseLeave
callbacks have any effect ?
... and if not, what would you prefer:
autopan?
and autopan= [true|false]
methods
An onAutoPan(flags,x,y,view)
callback that honors a boolean return value whether to bubble up the event to the application ?
I think the simpler is: autopan? and autopan= [true|false] methods.
I can actually detect the situation when it auto-pans. So onAutoPan(flags,x,y,view) would really just be an extra.
In most plugins, AutoPan makes sense and is not a problem. But in some cases, what you really want to do is to disable the feature.
Fredo
PS: I did not find a way to assign labels to this issue thread.
PS: I did not find a way to assign labels to this issue thread.
That's my job. ;)
Currently, all Ruby interactive tools (e.g. class Sketchup::Tool) have by default the AUTO-PAN feature enabled: when you move the mouse, with Left button down, across the edge of the viewport, the view starts panning.
This is also the behavior in almost all native Sketchup tools (Move, scale, ...), except the Select Tool.
I found NO way to disable it via the API.
Issue: this might be undesirable in some extensions when precisely the user selects an area on the viewport (say, like the Select tool), and the cursor gets close or across a viewport border. Then, what happens, is that the view starts to pan and the user has lost his original view camera, with no way to go back, except manually.
Furthermore, if you move the mouse across a viewport border with Left Button DOWN, but then RELEASE THE BUTTON while outside the viewport, the view pans indefinitely, until you click in the viewport.
Request: offer an option in the API to disable / enable / check Auto-pan.
Thanks
Fredo