forked from 1b-agent/opencadstudio-upstream
feat: inline MSPACE viewport overlay on 2D paper canvas
- viewport_screen_rect now mirrors PaperCanvas::draw()'s camera-based
to_px transform instead of using a fixed paper-limits scale, so the
3D overlay lands exactly over the drawn viewport border at any zoom/pan
- blue border frame (stack layer above the shader) makes the active
viewport boundary always visible even when it fills the canvas
- space-mode pill in MSPACE now dispatches LayoutSwitch("Model") so
clicking it jumps to full Model Space instead of just exiting to PSPACE
Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
This commit is contained in:
1 parent
459b525ffe
commit
fcc29de469
3 files changed
+63
-29
No files matched your search
+3
-3
@@ -92,7 +92,7 @@ impl StatusBar {
|
||||
osnap_btn(osnap_active, snapper.snap_enabled, popup_open),
|
||||
tip(
|
||||
space_mode_btn(¤t_layout, in_mspace),
|
||||
"Toggle Model/Paper space\nDouble-click viewport to enter MSPACE",
|
||||
"PAPER: double-click viewport to enter MSPACE\nMODEL: click to switch to Model Space",
|
||||
),
|
||||
status_pill(scale_label),
|
||||
]
|
||||
@@ -460,9 +460,9 @@ fn space_mode_btn(current_layout: &str, in_mspace: bool) -> Element<'static, Mes
|
||||
// PAPER = currently in paper-space editing
|
||||
// MODEL = currently in model-space editing (either the Model tab or MSPACE)
|
||||
let (label, active, on_press) = if is_model_tab {
|
||||
("MODEL", false, None)
|
||||
("MODEL", false, None::<Message>)
|
||||
} else if in_mspace {
|
||||
("MODEL", true, Some(Message::ExitViewport))
|
||||
("MODEL", true, Some(Message::LayoutSwitch("Model".to_string())))
|
||||
} else {
|
||||
("PAPER", false, Some(Message::MspaceCommand))
|
||||
};
|
||||
|
||||
Reference in new issue
Block a user