From b3a1db90ece907bae572158e174f0c1d9c27234f Mon Sep 17 00:00:00 2001 From: Steve Ruiz Date: Wed, 10 Apr 2024 15:12:08 +0100 Subject: [PATCH] Remove minimap throttling (#3438) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Our throttling isn't right for the minimap. Yanking this back. ### Change Type - [x] `sdk` — Changes the tldraw SDK - [x] `bugfix` — Bug fix --- .../tldraw/src/lib/ui/components/Minimap/MinimapManager.ts | 5 ++--- 1 file changed, 2 insertions(+), 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 0b5dd9cf0..eeef0fd7f 100644 --- a/packages/tldraw/src/lib/ui/components/Minimap/MinimapManager.ts +++ b/packages/tldraw/src/lib/ui/components/Minimap/MinimapManager.ts @@ -6,7 +6,6 @@ import { TLShapeId, Vec, clamp, - throttle, uniqueId, } from '@tldraw/editor' @@ -182,7 +181,7 @@ export class MinimapManager { } } - render = throttle(() => { + render = () => { const { cvs, pageBounds } = this this.updateCanvasPageBounds() @@ -339,7 +338,7 @@ export class MinimapManager { ctx.strokeRect(minX + 1 / sx, minY + 1 / sy, width - 2 / sx, height - 2 / sy) } } - }, 32) + } static roundedRect( ctx: CanvasRenderingContext2D | Path2D,