From 059218b567ce57d3afa771bd764cde6f5f55b459 Mon Sep 17 00:00:00 2001
From: bobzel <zzzman@gmail.com>
Date: Sun, 14 Apr 2024 17:22:10 -0400
Subject: clean up of freeform centeringShift and nativeScaling

---
 .../collectionFreeForm/CollectionFreeFormBackgroundGrid.tsx    | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

(limited to 'src/client/views/collections/collectionFreeForm/CollectionFreeFormBackgroundGrid.tsx')

diff --git a/src/client/views/collections/collectionFreeForm/CollectionFreeFormBackgroundGrid.tsx b/src/client/views/collections/collectionFreeForm/CollectionFreeFormBackgroundGrid.tsx
index 08dfb32ad..0acc99360 100644
--- a/src/client/views/collections/collectionFreeForm/CollectionFreeFormBackgroundGrid.tsx
+++ b/src/client/views/collections/collectionFreeForm/CollectionFreeFormBackgroundGrid.tsx
@@ -14,8 +14,8 @@ export interface CollectionFreeFormViewBackgroundGridProps {
     nativeDimScaling: () => number;
     zoomScaling: () => number;
     layoutDoc: Doc;
-    cachedCenteringShiftX: number;
-    cachedCenteringShiftY: number;
+    centeringShiftX: number;
+    centeringShiftY: number;
 }
 @observer
 export class CollectionFreeFormBackgroundGrid extends React.Component<CollectionFreeFormViewBackgroundGridProps> {
@@ -32,7 +32,7 @@ export class CollectionFreeFormBackgroundGrid extends React.Component<Collection
         const w = this.props.PanelWidth() / this.props.nativeDimScaling() + 2 * renderGridSpace;
         const h = this.props.PanelHeight() / this.props.nativeDimScaling() + 2 * renderGridSpace;
         const strokeStyle = this.props.color();
-        return !this.props.nativeDimScaling() ? null : (
+        return (
             <canvas
                 className="collectionFreeFormView-grid"
                 width={w}
@@ -41,8 +41,8 @@ export class CollectionFreeFormBackgroundGrid extends React.Component<Collection
                 ref={el => {
                     const ctx = el?.getContext('2d');
                     if (ctx) {
-                        const Cx = this.props.cachedCenteringShiftX % renderGridSpace;
-                        const Cy = this.props.cachedCenteringShiftY % renderGridSpace;
+                        const Cx = this.props.centeringShiftX % renderGridSpace;
+                        const Cy = this.props.centeringShiftY % renderGridSpace;
                         ctx.lineWidth = Math.min(1, Math.max(0.5, this.props.zoomScaling()));
                         ctx.setLineDash(gridSpace > 50 ? [3, 3] : [1, 5]);
                         ctx.clearRect(0, 0, w, h);
-- 
cgit v1.2.3-70-g09d2

