Преглед на файлове

fix: a style issue of shape selection

Peng Xiao преди 3 години
родител
ревизия
9371af9941
променени са 2 файла, в които са добавени 4 реда и са изтрити 1 реда
  1. 4 0
      tldraw/apps/tldraw-logseq/src/lib/shapes/LogseqPortalShape.tsx
  2. 0 1
      tldraw/packages/react/src/components/Canvas/Canvas.tsx

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

@@ -800,6 +800,10 @@ export class LogseqPortalShape extends TLBoxShape<LogseqPortalShapeProps> {
 
 
   ReactIndicator = observer(() => {
   ReactIndicator = observer(() => {
     const bounds = this.getBounds()
     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} />
     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') &&
           {!app.isIn('select.pinching') &&
-            selectedShapes?.length !== 1 &&
             selectedShapes?.map(shape => (
             selectedShapes?.map(shape => (
               <Indicator
               <Indicator
                 key={'selected_indicator_' + shape.id}
                 key={'selected_indicator_' + shape.id}