From a9bc79b1c2443062ff8a644ea60cc06deee47449 Mon Sep 17 00:00:00 2001 From: Steve Ruiz Date: Sat, 16 Mar 2024 15:00:46 +0000 Subject: [PATCH] [fix] handles (#3177) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This PR is a quick follower to fix handles ### Change Type - [x] `sdk` — Changes the tldraw SDK - [ ] `dotcom` — Changes the tldraw.com web app - [ ] `docs` — Changes to the documentation, examples, or templates. - [ ] `vs code` — Changes to the vscode plugin - [ ] `internal` — Does not affect user-facing stuff - [x] `bugfix` — Bug fix - [ ] `feature` — New feature - [ ] `improvement` — Improving existing features - [ ] `chore` — Updating dependencies, other boring stuff - [ ] `galaxy brain` — Architectural changes - [ ] `tests` — Changes to any test code - [ ] `tools` — Changes to infrastructure, CI, internal scripts, debugging tools, etc. - [ ] `dunno` — I don't know --- .../src/lib/components/default-components/DefaultCanvas.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/editor/src/lib/components/default-components/DefaultCanvas.tsx b/packages/editor/src/lib/components/default-components/DefaultCanvas.tsx index aa41b141d..2f4df4ef5 100644 --- a/packages/editor/src/lib/components/default-components/DefaultCanvas.tsx +++ b/packages/editor/src/lib/components/default-components/DefaultCanvas.tsx @@ -243,6 +243,7 @@ function HandlesWrapperInner({ shapeId }: { shapeId: TLShapeId }) { const transform = useValue('handles transform', () => editor.getShapePageTransform(shapeId), [ editor, + shapeId, ]) const handles = useValue( @@ -275,7 +276,7 @@ function HandlesWrapperInner({ shapeId }: { shapeId: TLShapeId }) { .sort((a) => (a.type === 'vertex' ? 1 : -1)) ) }, - [editor, zoomLevel, isCoarse] + [editor, zoomLevel, isCoarse, shapeId] ) if (!Handles || !handles || !transform) {