From cf17ca2f8489bb7457cd9a8770f7746afd9a5459 Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Wed, 25 Sep 2024 20:04:35 +1000 Subject: [PATCH] Revert "Fix occlusion rounding bug (#3400)" This reverts commit 96ff4f1a4a748a536d02147a0fd78f361fe25d70. This change broke adding of new occlusions on desktop: JS error /_anki/js/editor.js:100016 Uncaught TypeError: Cannot read properties of undefined (reading 'getBoundingRect') --- ts/routes/image-occlusion/tools/lib.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ts/routes/image-occlusion/tools/lib.ts b/ts/routes/image-occlusion/tools/lib.ts index fd3609bd3..3f7483949 100644 --- a/ts/routes/image-occlusion/tools/lib.ts +++ b/ts/routes/image-occlusion/tools/lib.ts @@ -320,5 +320,5 @@ export const isPointerInBoundingBox = (pointer): boolean => { export const getBoundingBox = () => { const canvas = globalThis.canvas; - return canvas.getObjects().find((obj) => obj.fill === "transparent").getBoundingRect(true); + return canvas.getObjects().find((obj) => obj.fill === "transparent"); };