File tree Expand file tree Collapse file tree
packages/editor/src/lib/editor Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -5330,18 +5330,17 @@ export class Editor extends EventEmitter<TLEventMap> {
53305330 }
53315331 }
53325332
5333- if ( this . isShapeFrame ( shape ) ) {
5333+ if ( this . isShapeOfType ( shape , 'frame' ) ) {
53345334 // On the rare case that we've hit a frame (not its label), test again hitInside to be forced true;
53355335 // this prevents clicks from passing through the body of a frame to shapes behind it.
53365336
53375337 // If the hit is within the frame's outer margin, then select the frame
53385338 const distance = geometry . distanceToPoint ( pointInShapeSpace , hitFrameInside )
53395339 if (
5340- ( shape as any ) . type !== 'grid' &&
5341- ( hitFrameInside
5340+ hitFrameInside
53425341 ? ( distance > 0 && distance <= outerMargin ) ||
53435342 ( distance <= 0 && distance > - innerMargin )
5344- : distance > 0 && distance <= outerMargin )
5343+ : distance > 0 && distance <= outerMargin
53455344 ) {
53465345 return inMarginClosestToEdgeHit || shape
53475346 }
@@ -5356,7 +5355,7 @@ export class Editor extends EventEmitter<TLEventMap> {
53565355 return (
53575356 inMarginClosestToEdgeHit ||
53585357 inHollowSmallestAreaHit ||
5359- ( hitFrameInside || ( shape as any ) . type === 'grid' ? shape : undefined )
5358+ ( hitFrameInside ? shape : undefined )
53605359 )
53615360 }
53625361 continue
You can’t perform that action at this time.
0 commit comments