Browse Source

fix: a style issue of shape selection

Peng Xiao 3 năm trước cách đây
mục cha
commit
9371af9941

+ 4 - 0
tldraw/apps/tldraw-logseq/src/lib/shapes/LogseqPortalShape.tsx

@@ -800,6 +800,10 @@ export class LogseqPortalShape extends TLBoxShape<LogseqPortalShapeProps> {
 
   ReactIndicator = observer(() => {
     const bounds = this.getBounds()
+    const app = useApp<Shape>()
+    if (app.selectedShapesArray.length === 1) {
+      return null
+    }
     return <rect width={bounds.width} height={bounds.height} fill="transparent" rx={8} ry={8} />
   })
 

+ 0 - 1
tldraw/packages/react/src/components/Canvas/Canvas.tsx

@@ -138,7 +138,6 @@ export const Canvas = observer(function Renderer<S extends TLReactShape>({
               />
             ))}
           {!app.isIn('select.pinching') &&
-            selectedShapes?.length !== 1 &&
             selectedShapes?.map(shape => (
               <Indicator
                 key={'selected_indicator_' + shape.id}