Skip to content

Commit 4a08975

Browse files
fix: map control issues
1 parent 59b1b59 commit 4a08975

File tree

1 file changed

+8
-8
lines changed
  • examples/playground/src/components/map

1 file changed

+8
-8
lines changed

examples/playground/src/components/map/index.tsx

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ function OverlayControls() {
118118
if (!chart) return null
119119

120120
return (
121-
<div className="absolute right-5 top-5 bg-blue-gray-500 z-[999] p-2 rounded-md flex flex-col gap-2">
121+
<div className="absolute right-5 top-16 bg-blue-gray-500 z-[999] p-2 rounded-md flex flex-col gap-2">
122122
<div className="flex justify-between items-center gap-3">
123123
<span className="text-xs">
124124
{chart.index_number}: {chart.name}
@@ -169,7 +169,6 @@ export default function MapPane() {
169169
whenReady={() => {
170170
setInterval(() => mapRef.current?.invalidateSize(), 1000)
171171
}}>
172-
<OverlayControls />
173172
{mapVisible &&
174173
(app && user?.scope.includes(Scope.TILES) ? (
175174
<NavigraphTiles auth={app.auth} />
@@ -181,13 +180,14 @@ export default function MapPane() {
181180
))}
182181
{charts && <ChartOverlay charts={charts} />}
183182
{user?.scope.includes(Scope.AMDB) && <AmdbManager />}
184-
<Button
185-
selected={mapVisible}
186-
className="absolute top-5 right-5 z-[999]"
187-
onClick={() => setMapVisible(!mapVisible)}>
188-
Map Visible
189-
</Button>
190183
</MapContainer>
184+
<OverlayControls />
185+
<Button
186+
selected={mapVisible}
187+
className="absolute top-5 right-5 z-[999]"
188+
onClick={() => setMapVisible(!mapVisible)}>
189+
Map Visible
190+
</Button>
191191
</div>
192192
)
193193
}

0 commit comments

Comments
 (0)