kopia lustrzana https://github.com/Tldraw/Tldraw
textfields: for unfilled geo shapes fix edit->edit
rodzic
a319ad9497
commit
9c8e4b73fe
|
@ -1087,13 +1087,15 @@ input,
|
|||
* One extra nuance is we don't use this behavior for:
|
||||
* - arrows which have weird geometry and just gets in the way.
|
||||
* - draw/line shapes, because it feels restrictive to have them be 'in the way' of clicking on a textfield
|
||||
* - shapes that are not filled
|
||||
*/
|
||||
.tl-canvas[data-iseditinganything='true']
|
||||
.tl-shape:not(
|
||||
[data-shape-type='arrow'],
|
||||
[data-shape-type='draw'],
|
||||
[data-shape-type='line'],
|
||||
[data-shape-type='highlight']
|
||||
[data-shape-type='highlight'],
|
||||
[data-shape-is-filled='false']
|
||||
) {
|
||||
pointer-events: all;
|
||||
}
|
||||
|
|
|
@ -142,6 +142,8 @@ export const Shape = memo(function Shape({
|
|||
|
||||
if (!shape) return null
|
||||
|
||||
const isFilledShape = 'fill' in shape.props && shape.props.fill !== 'none'
|
||||
|
||||
return (
|
||||
<>
|
||||
{util.backgroundComponent && (
|
||||
|
@ -156,7 +158,13 @@ export const Shape = memo(function Shape({
|
|||
</OptionalErrorBoundary>
|
||||
</div>
|
||||
)}
|
||||
<div ref={containerRef} className="tl-shape" data-shape-type={shape.type} draggable={false}>
|
||||
<div
|
||||
ref={containerRef}
|
||||
className="tl-shape"
|
||||
data-shape-type={shape.type}
|
||||
data-shape-is-filled={isFilledShape}
|
||||
draggable={false}
|
||||
>
|
||||
<OptionalErrorBoundary fallback={ShapeErrorFallback as any} onError={annotateError}>
|
||||
<InnerShape shape={shape} util={util} />
|
||||
</OptionalErrorBoundary>
|
||||
|
|
Ładowanie…
Reference in New Issue