fix(zoom): include inserted block extents

Use current rendered geometry instead of load-time cluster spans when fitting model extents.

Refs #853
This commit is contained in:
Hakan Seven committed 2026-08-25 22:11:18 +03:00
1 parent 968ee3fda4
commit 81de94fdbb
2 files changed
+14 -52

No files matched your search

+2 -7
View File
@@ -1657,14 +1657,9 @@ pub struct Scene {
pub bg_color: [f32; 4],
/// Custom paper-space background fill color for Wipeout entities.
pub paper_bg_color: [f32; 4],
/// Largest local-space coordinate expected from real geometry, derived from
/// EXTMIN/EXTMAX (10× safety margin). Used by fit_all() to ignore garbage
/// entity coordinates (origin-stuck entities, bad Ray/XLine direction vectors).
/// Dense model-space cluster half-span used for viewport recovery.
pub local_extent_max: f32,
/// Robust centre (median of entity centroids) of the dense model-space
/// cluster. Used together with `local_extent_max` to frame a viewport whose
/// saved view is missing — aiming at the raw extents centre would land in
/// the empty gap when a drawing has a second, far cluster.
/// Dense model-space cluster median used for viewport recovery.
pub local_center: [f64; 2],
/// Current annotation scale (CANNOSCALE equivalent).
/// Multiplier applied to Text/MText/Dimension sizes during tessellation.