ElyTable: a sheet starts at the left, even before its geometry arrives (T-03)

This commit is contained in:
ZacharyZhang-NY committed 2026-10-09 10:16:11 -04:00
1 parent ecf977364b
commit a6d8a1de43
8 files changed
+43 -10

No files matched your search

+4
View File
@@ -251,6 +251,10 @@ impl LokView {
/// Room beside a narrow document, which sits centred.
pub(super) fn slack(&self) -> (f32, f32) {
// A sheet's grid grows with the view; it starts left.
if self.doc.is_sheet() {
return (0.0, 0.0);
}
let extent = self.extent();
let slack = |view: f32, doc: i32| (view - self.geom.px_of(doc)).max(0.0) / 2.0;
// A fitted page sits centred both ways.