Skip to content

Commit e89b5ed

Browse files
authored
Merge pull request #942 from mapbox/cw/disable-zoom-to-all
disable zoom to all button when there are no features
2 parents ce8f74c + 14634b7 commit e89b5ed

File tree

1 file changed

+5
-1
lines changed
  • next/app/components/panels/feature_editor/feature_editor_folder

1 file changed

+5
-1
lines changed

next/app/components/panels/feature_editor/feature_editor_folder/header.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,11 @@ export function FeatureEditorFolderHeader({
7777
</P.Root>
7878
<Tooltip.Root>
7979
<Tooltip.Trigger asChild>
80-
<Button onClick={handleZoomToAll} size="xs">
80+
<Button
81+
onClick={handleZoomToAll}
82+
size="xs"
83+
disabled={featureMap.size === 0}
84+
>
8185
<Crosshair1Icon />
8286
</Button>
8387
</Tooltip.Trigger>

0 commit comments

Comments
 (0)