ElyTable: zoom and DPI keep the scroll in print twips; drag and zoom tests far down a sheet (R2.16)

This commit is contained in:
ZacharyZhang-NY committed 2026-10-09 02:29:46 -04:00
1 parent eb844cc72c
commit 56855acfb4
20 files changed
+155 -64

No files matched your search

+5 -7
View File
@@ -49,11 +49,9 @@ impl LokView {
self.geom.twips_of(self.viewport.0) - fx,
self.geom.twips_of(self.viewport.1) - fy,
);
// Room past the target, so the clamp lets it show.
self.reach = (
self.reach.0.max(x + w + vw + fx),
self.reach.1.max(y + h + vh + fy),
);
// Room past the target, in print twips for later zooms.
let need = self.print_of((x + w + vw + fx, y + h + vh + fy));
self.reach = (self.reach.0.max(need.0), self.reach.1.max(need.1));
if x >= fx && (x < fx + self.scroll.0 || x + w > fx + self.scroll.0 + vw) {
self.scroll.0 = x - fx - vw / 2;
}
@@ -104,10 +102,10 @@ impl LokView {
if self.fit {
return self.doc_size;
}
(
self.tile_of((
self.doc_size.0.max(self.reach.0),
self.doc_size.1.max(self.reach.1),
)
))
}
/// The print-twips document point under a view position (LOK-04).