浏览代码

fix: enable pointer events on shape labels

Konstantinos Kaloutas 2 年之前
父节点
当前提交
376d97f7c6

+ 1 - 0
tldraw/apps/tldraw-logseq/src/lib/shapes/BoxShape.tsx

@@ -95,6 +95,7 @@ export class BoxShape extends TLBoxShape<BoxShapeProps> {
             onBlur={onEditingEnd}
             fontStyle={italic ? 'italic' : 'normal'}
             fontWeight={fontWeight}
+            pointerEvents={!!label}
           />
           <SVGContainer opacity={isErasing ? 0.2 : opacity}>
             {isBinding && <BindingIndicator mode="svg" strokeWidth={strokeWidth} size={[w, h]} />}

+ 1 - 0
tldraw/apps/tldraw-logseq/src/lib/shapes/EllipseShape.tsx

@@ -95,6 +95,7 @@ export class EllipseShape extends TLEllipseShape<EllipseShapeProps> {
             onBlur={onEditingEnd}
             fontStyle={italic ? 'italic' : 'normal'}
             fontWeight={fontWeight}
+            pointerEvents={!!label}
           />
           <SVGContainer {...events} opacity={isErasing ? 0.2 : opacity}>
             <ellipse

+ 1 - 0
tldraw/apps/tldraw-logseq/src/lib/shapes/PolygonShape.tsx

@@ -111,6 +111,7 @@ export class PolygonShape extends TLPolygonShape<PolygonShapeProps> {
             onBlur={onEditingEnd}
             fontStyle={italic ? 'italic' : 'normal'}
             fontWeight={fontWeight}
+            pointerEvents={!!label}
           />
           <SVGContainer opacity={isErasing ? 0.2 : opacity}>
             <g transform={`translate(${x}, ${y})`}>