forked from 1b-agent/opencadstudio-upstream
navigation: pan and orbit keep going past the viewport edge
A middle-button drag stopped when the pointer left the viewport: the mouse area reports moves only inside, and leaving reset the drag, so the release outside never arrived (#1400). The viewport and each model pane now carry an input layer that keeps reporting a drag they started, with the pointer anywhere in the window, and the release outside ends it; leaving no longer cancels a middle-button drag. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
1 parent
39c3e9af58
commit
cc78899363
2 files changed
+91
-14
No files matched your search
@@ -3187,9 +3187,13 @@ impl OpenCADStudio {
|
||||
sel.input.right_last_pos = None;
|
||||
sel.input.right_dragging = false;
|
||||
sel.input.right_click_entered = false;
|
||||
sel.input.middle_down = false;
|
||||
sel.input.middle_last_pos = None;
|
||||
sel.orbit.pivot = None;
|
||||
// A pan or orbit keeps following the pointer outside the viewport;
|
||||
// its input layer reports the moves and the release there.
|
||||
if !sel.input.middle_down {
|
||||
sel.input.middle_down = false;
|
||||
sel.input.middle_last_pos = None;
|
||||
sel.orbit.pivot = None;
|
||||
}
|
||||
sel.gesture.box_anchor = None;
|
||||
sel.gesture.box_anchor_world = None;
|
||||
sel.gesture.box_current = None;
|
||||
|
||||
Reference in new issue
Block a user