From 2b6dac7337536a7f1bf6087f41115feccf10fd09 Mon Sep 17 00:00:00 2001 From: Gray Crawford Date: Fri, 27 Feb 2026 15:02:29 -0800 Subject: [PATCH 1/3] selecting assets now has no margin --- packages/editor/src/lib/editor/Editor.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/editor/src/lib/editor/Editor.ts b/packages/editor/src/lib/editor/Editor.ts index cec4046f81d2..0265128b3561 100644 --- a/packages/editor/src/lib/editor/Editor.ts +++ b/packages/editor/src/lib/editor/Editor.ts @@ -5402,10 +5402,10 @@ export class Editor extends EventEmitter { // Are we close to the shape's edge? if (distance <= outerMargin || (hitInside && distance <= 0 && distance > -innerMargin)) { if (geometry.isFilled || (isGroup && geometry.children[0].isFilled)) { - // If the shape is filled, then it's a hit. Remember, we're - // starting from the TOP-MOST shape in z-index order, so any - // other hits would be occluded by the shape. - return inMarginClosestToEdgeHit || shape + if (distance <= 0) { + return inMarginClosestToEdgeHit || shape + } + // Point is outside the filled shape but within margin — skip (no margin bleed) } else { // If the shape is bigger than the viewport, then skip it. if (this.getShapePageBounds(shape)!.contains(viewportPageBounds)) continue From 683cf1b6a6288d29957735b12a74f704adec7ec4 Mon Sep 17 00:00:00 2001 From: Kazuho Okui Date: Fri, 27 Feb 2026 16:58:29 -0800 Subject: [PATCH 2/3] +1 px hover area --- packages/editor/src/lib/editor/Editor.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/editor/src/lib/editor/Editor.ts b/packages/editor/src/lib/editor/Editor.ts index 0265128b3561..62c768c642ef 100644 --- a/packages/editor/src/lib/editor/Editor.ts +++ b/packages/editor/src/lib/editor/Editor.ts @@ -5402,7 +5402,7 @@ export class Editor extends EventEmitter { // Are we close to the shape's edge? if (distance <= outerMargin || (hitInside && distance <= 0 && distance > -innerMargin)) { if (geometry.isFilled || (isGroup && geometry.children[0].isFilled)) { - if (distance <= 0) { + if (distance <= 1) { return inMarginClosestToEdgeHit || shape } // Point is outside the filled shape but within margin — skip (no margin bleed) From a07286eabef48500a8301e249fa21d49c3bb18f4 Mon Sep 17 00:00:00 2001 From: Kazuho Okui Date: Fri, 27 Feb 2026 17:18:09 -0800 Subject: [PATCH 3/3] Revert comment back --- packages/editor/src/lib/editor/Editor.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/editor/src/lib/editor/Editor.ts b/packages/editor/src/lib/editor/Editor.ts index 7a34d3cac9d1..43e1a5031ab5 100644 --- a/packages/editor/src/lib/editor/Editor.ts +++ b/packages/editor/src/lib/editor/Editor.ts @@ -5404,6 +5404,9 @@ export class Editor extends EventEmitter { // Are we close to the shape's edge? if (distance <= outerMargin || (hitInside && distance <= 0 && distance > -innerMargin)) { if (geometry.isFilled || (isGroup && geometry.children[0].isFilled)) { + // If the shape is filled, then it's a hit. Remember, we're + // starting from the TOP-MOST shape in z-index order, so any + // other hits would be occluded by the shape. if (distance <= 1) { return inMarginClosestToEdgeHit || shape }