4
0
Эх сурвалжийг харах

fix(topology): tooltip card clipped by overflow-hidden on map container (#88)

The map <section> had overflow-hidden to clip the mesh background to the
rounded corners. But the TooltipCard (z-20, absolute) is a child of that
section, so when hovering a device chip near the top or bottom edge the
tooltip extended beyond the container and was clipped — the user couldn't
see the device info.

SVG clips its own content by default, so overflow-hidden was only needed
for the mesh background. Move it to the mesh-bg wrapper (overflow-hidden
rounded-2xl) and remove it from the section. The tooltip can now render
outside the container bounds without being cut.

Co-authored-by: gnacho <hnacho@proton.me>
Nacho 3 сар өмнө
parent
commit
ecbc68f25c

+ 2 - 2
app/src/pages/Topology.tsx

@@ -182,10 +182,10 @@ export default function Topology() {
 
 
       {/* ② Map canvas */}
       {/* ② Map canvas */}
       <section
       <section
-        className="relative h-[70dvh] min-h-[420px] overflow-hidden rounded-2xl border border-border bg-canvas lg:h-[600px]"
+        className="relative h-[70dvh] min-h-[420px] rounded-2xl border border-border bg-canvas lg:h-[600px]"
         aria-label={t('topology.interactiveMap')}
         aria-label={t('topology.interactiveMap')}
       >
       >
-        <div className="mesh-bg pointer-events-none absolute inset-0" aria-hidden />
+        <div className="mesh-bg pointer-events-none absolute inset-0 overflow-hidden rounded-2xl" aria-hidden />
         <TopologyMap
         <TopologyMap
           model={model}
           model={model}
           apiRef={mapApi}
           apiRef={mapApi}