Skip to content

Commit

Permalink
fix: enable pointer events on shape labels
Browse files Browse the repository at this point in the history
  • Loading branch information
sprocketc authored and tiensonqin committed Dec 28, 2022
1 parent 5ddc003 commit 376d97f
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions tldraw/apps/tldraw-logseq/src/lib/shapes/BoxShape.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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]} />}
Expand Down
1 change: 1 addition & 0 deletions tldraw/apps/tldraw-logseq/src/lib/shapes/EllipseShape.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions tldraw/apps/tldraw-logseq/src/lib/shapes/PolygonShape.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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})`}>
Expand Down

0 comments on commit 376d97f

Please sign in to comment.