Skip to content

Commit

Permalink
Add getCursor handler to Atlas to show pointer cursor on pickable fea…
Browse files Browse the repository at this point in the history
…tures
  • Loading branch information
TylerMatteo committed Jul 1, 2024
1 parent 833f172 commit a4b80c0
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions app/components/atlas.client.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,12 @@ export function Atlas() {
communityDistrictsLayer,
cityCouncilDistrictsLayer,
]}
getCursor={({ isDragging, isHovering }) => {
if (isDragging) {
return "grabbing";
}
return isHovering ? "pointer" : "grab";
}}
>
<Map
mapStyle={"https://tiles.planninglabs.nyc/styles/positron/style.json"}
Expand Down

0 comments on commit a4b80c0

Please sign in to comment.