Make freeze shadow move with a pinch-zoom

Previously the freeze shadow would stay where it was, creating a hard
edge and confusion about where was frozen. With this change, the freeze
shadow moves with the zoom.

This change needs a followup to show/hide the shadow when we reach/move
away from the document edge.

Signed-off-by: Skyler Grey <skyler.grey@collabora.com>
Change-Id: I8bec41be6ce5eff3c1bfd3ac0234b6d53833614b
pull/8932/head
Skyler Grey 2024-04-22 14:27:39 +00:00 committed by Szymon Kłos
parent f50d5a1303
commit 227bf6de6b
1 changed files with 5 additions and 0 deletions

View File

@ -491,6 +491,11 @@ class CanvasOverlay extends CanvasSectionObject {
const splitPos = this.tsManager.getSplitPos();
let selectionBackgroundGradient = null;
if (this.tsManager._inZoomAnim) {
splitPos.x *= this.tsManager._zoomFrameScale;
splitPos.y *= this.tsManager._zoomFrameScale;
}
// last row geometry data will be a good for setting deafult raw height
const spanlist = this.map._docLayer.sheetGeometry.getRowsGeometry()._visibleSizes._spanlist;
const rowData = spanlist[spanlist.length - 1];