diff --git a/packages/tldraw/src/lib/shapes/arrow/ArrowShapeUtil.tsx b/packages/tldraw/src/lib/shapes/arrow/ArrowShapeUtil.tsx index 09a616bfc..2895c5337 100644 --- a/packages/tldraw/src/lib/shapes/arrow/ArrowShapeUtil.tsx +++ b/packages/tldraw/src/lib/shapes/arrow/ArrowShapeUtil.tsx @@ -530,6 +530,8 @@ export class ArrowShapeUtil extends ShapeUtil { if (!info?.isValid) return null const labelPosition = getArrowLabelPosition(this.editor, shape) + const isEditing = this.editor.getEditingShapeId() === shape.id + const showArrowLabel = isEditing || shape.props.text return ( <> @@ -539,15 +541,17 @@ export class ArrowShapeUtil extends ShapeUtil { shouldDisplayHandles={shouldDisplayHandles && onlySelectedShape === shape} /> - + {showArrowLabel && ( + + )} ) } diff --git a/packages/tldraw/src/lib/shapes/geo/GeoShapeUtil.tsx b/packages/tldraw/src/lib/shapes/geo/GeoShapeUtil.tsx index 9a703574a..a02786fde 100644 --- a/packages/tldraw/src/lib/shapes/geo/GeoShapeUtil.tsx +++ b/packages/tldraw/src/lib/shapes/geo/GeoShapeUtil.tsx @@ -383,33 +383,42 @@ export class GeoShapeUtil extends BaseBoxShapeUtil { const { id, type, props } = shape const { labelColor, fill, font, align, verticalAlign, size, text } = props + const isEditing = this.editor.getEditingShapeId() === id + const showHtmlContainer = isEditing || shape.props.url || shape.props.text + return ( <> - - - {shape.props.url && ( - - )} - + {showHtmlContainer && ( + + + {shape.props.url && ( + + )} + + )} ) }