diff --git a/packages/tldraw/src/lib/tools/SelectTool/childStates/PointingShape.ts b/packages/tldraw/src/lib/tools/SelectTool/childStates/PointingShape.ts index 701e54552fd8..79446240077d 100644 --- a/packages/tldraw/src/lib/tools/SelectTool/childStates/PointingShape.ts +++ b/packages/tldraw/src/lib/tools/SelectTool/childStates/PointingShape.ts @@ -1,4 +1,4 @@ -import { Group2d, StateNode, TLPointerEventInfo, TLShape } from '@tldraw/editor' +import { StateNode, TLPointerEventInfo, TLShape } from '@tldraw/editor' import { isOverArrowLabel } from '../../../shapes/arrow/arrowLabel' import { getTextLabels } from '../../../utils/shapes/shapes' @@ -11,7 +11,6 @@ export class PointingShape extends StateNode { didCtrlOnEnter = false didSelectOnEnter = false - didHitGridLabel = false override onEnter(info: TLPointerEventInfo & { target: 'shape' }) { const selectedShapeIds = this.editor.getSelectedShapeIds() @@ -23,19 +22,6 @@ export class PointingShape extends StateNode { this.hitShape = info.shape this.isDoubleClick = false this.didCtrlOnEnter = accelKey - this.didHitGridLabel = false - if ((info.shape as any).type === 'grid') { - const geometry = this.editor.getShapeGeometry(info.shape) - if (geometry instanceof Group2d) { - const pointInShapeSpace = this.editor.getPointInShapeSpace(info.shape, currentPagePoint) - for (const child of geometry.children) { - if (child.isLabel && child.isPointInBounds(pointInShapeSpace)) { - this.didHitGridLabel = true - break - } - } - } - } const outermostSelectingShape = this.editor.getOutermostSelectableShape(info.shape) const selectedAncestor = this.editor.findShapeAncestor(outermostSelectingShape, (parent) => selectedShapeIds.includes(parent.id)