From ca8566598d2ae9c85b1ea9418fced7261a7f11e2 Mon Sep 17 00:00:00 2001
From: Geireann Lindfield Roberts <60007097+geireann@users.noreply.github.com>
Date: Sun, 9 Aug 2020 13:17:07 +0800
Subject: updates

---
 src/client/views/nodes/CollectionFreeFormDocumentView.tsx | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

(limited to 'src/client/views/nodes/CollectionFreeFormDocumentView.tsx')

diff --git a/src/client/views/nodes/CollectionFreeFormDocumentView.tsx b/src/client/views/nodes/CollectionFreeFormDocumentView.tsx
index 42a42ddf1..616aa2e96 100644
--- a/src/client/views/nodes/CollectionFreeFormDocumentView.tsx
+++ b/src/client/views/nodes/CollectionFreeFormDocumentView.tsx
@@ -164,15 +164,16 @@ export class CollectionFreeFormDocumentView extends DocComponent<CollectionFreeF
         setTimeout(() => docs.forEach(doc => doc.dataTransition = "inherit"), 1010);
     }
 
-    public static setupZoom(doc: Doc, zoomProgressivize: boolean = false) {
+
+    public static setupZoom(doc: Doc, targDoc: Doc, zoomProgressivize: boolean = false) {
         const width = new List<number>();
         const height = new List<number>();
         const top = new List<number>();
         const left = new List<number>();
-        width.push(NumCast(doc.width));
-        height.push(NumCast(doc.height));
-        top.push(NumCast(doc.height) / -2);
-        left.push(NumCast(doc.width) / -2);
+        width.push(NumCast(targDoc._width));
+        height.push(NumCast(targDoc._height));
+        top.push(NumCast(targDoc._height) / -2);
+        left.push(NumCast(targDoc._width) / -2);
         doc["viewfinder-width-indexed"] = width;
         doc["viewfinder-height-indexed"] = height;
         doc["viewfinder-top-indexed"] = top;
-- 
cgit v1.2.3-70-g09d2

