Zoom reads the current centring offset, so bunched zooms hold the anchor (R2.7); figures pass kernel values through, tested (R2.8)

This commit is contained in:
ZacharyZhang-NY committed 2026-10-09 05:56:15 -04:00
1 parent 2c3f3894dd
commit 6445f3144d
4 files changed
+19 -1

No files matched your search

+3 -1
View File
@@ -47,8 +47,10 @@ impl LokView {
Some(at) => (f32::from(at.x - self.origin.x), f32::from(at.y - self.origin.y)),
None => (self.viewport.0 / 2.0, self.viewport.1 / 2.0),
};
// The offset now, not the last frame's: zooms may bunch.
let spare = self.slack();
let (sx, sy) = (ax - spare.0, ay - spare.1);
// Anchored in print twips: tile twips change with the zoom.
let (sx, sy) = (ax - self.spare.0, ay - self.spare.1);
let under = self.print_of((self.scroll.0 + self.geom.twips_of(sx), self.scroll.1 + self.geom.twips_of(sy)));
self.fit = false;
if (zoom - self.geom.zoom).abs() > 0.0001 {