From b56c4dd22545eb11b64c67d37459a3844d5e6267 Mon Sep 17 00:00:00 2001 From: Steve Ruiz Date: Tue, 23 Apr 2024 11:42:03 +0100 Subject: [PATCH] Fix collaborator size with zoom (#3563) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fix a bug with the size of collaborators. ### Change Type - [x] `sdk` — Changes the tldraw SDK - [x] `bugfix` — Bug fix --- .../tldraw/src/lib/ui/components/Minimap/MinimapManager.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/packages/tldraw/src/lib/ui/components/Minimap/MinimapManager.ts b/packages/tldraw/src/lib/ui/components/Minimap/MinimapManager.ts index 841020b08..31db9ebae 100644 --- a/packages/tldraw/src/lib/ui/components/Minimap/MinimapManager.ts +++ b/packages/tldraw/src/lib/ui/components/Minimap/MinimapManager.ts @@ -134,9 +134,7 @@ export class MinimapManager { } @computed getZoom() { - const cpb = this.getCanvasPageBounds() - const vp = this.editor.getViewportPageBounds() - return cpb.width / vp.width + return this.getCanvasPageBounds().width / this.getCanvasScreenBounds().width } @computed getCanvasPageBoundsArray() {