Selaa lähdekoodia

fix: hovered or selected shape should have higher zindex

Peng Xiao 2 vuotta sitten
vanhempi
sitoutus
0ea444c545
1 muutettua tiedostoa jossa 1 lisäystä ja 1 poistoa
  1. 1 1
      tldraw/packages/react/src/components/Canvas/Canvas.tsx

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

@@ -138,7 +138,7 @@ export const Canvas = observer(function Renderer<S extends TLReactShape>({
                 isSelected={selectedShapesSet.has(shape)}
                 isErasing={erasingShapesSet.has(shape)}
                 meta={meta}
-                zIndex={1000 + i}
+                zIndex={selectedOrHooveredShape === shape ? 10000 : 1000 + i}
                 onEditingEnd={onEditingEnd}
               />
             ))}