fix: align map control hover spacing

Let control surfaces size to their 40px buttons, padding and borders. Reserve the resulting 50px mobile dock height to keep the map controls clear.

The initial alignment check covered only horizontal spacing and missed the mobile height constraint. Check all four outer edges at desktop and mobile widths, plus the dock gap, to prevent recurrence.
This commit is contained in:
2026-11-02 15:35:11 +08:00
parent 5f7041ffae
commit 74bf7c64c4
6 changed files with 62 additions and 6 deletions
+1 -1
View File
@@ -47,7 +47,7 @@ export function MapToolbar({
"pointer-events-auto p-1",
MAP_CONTROL_RADIUS_CLASS_NAME,
MAP_CONTROL_SURFACE_CLASS_NAME,
isVertical ? "flex w-12 flex-col" : "inline-flex",
isVertical ? "flex w-fit flex-col" : "inline-flex",
className
)}
>
+1 -1
View File
@@ -86,7 +86,7 @@ export function MapZoom({
<div
role="group"
aria-label="地图缩放"
className={cn("pointer-events-auto flex w-12 flex-col gap-2", className)}
className={cn("pointer-events-auto flex w-fit flex-col gap-2", className)}
>
<div
className={cn(