Skip to content

Commit

Permalink
Indicate what's clickable
Browse files Browse the repository at this point in the history
  • Loading branch information
dabreegster committed Mar 15, 2024
1 parent a6b6889 commit b53073d
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 3 deletions.
3 changes: 3 additions & 0 deletions web/src/common/layers/RenderIntersectionPolygons.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
import { caseHelper, layerId, emptyGeojson } from "../utils";
import { hoverStateFilter, FillLayer, GeoJSON } from "svelte-maplibre";
export let hoverCursor: string | undefined = undefined;
let show = true;
$: gj = $network ? JSON.parse($network.toGeojsonPlain()) : emptyGeojson();
Expand All @@ -17,6 +19,7 @@
}}
manageHoverState
bind:hovered={$hoveredIntersection}
{hoverCursor}
filter={["==", ["get", "type"], "intersection"]}
paint={{
"fill-color": {
Expand Down
3 changes: 3 additions & 0 deletions web/src/common/layers/RenderLanePolygons.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
import { layerId, emptyGeojson, caseHelper } from "../utils";
import { hoverStateFilter, FillLayer, GeoJSON } from "svelte-maplibre";
export let hoverCursor: string | undefined = undefined;
let show = true;
$: gj = $network
Expand All @@ -19,6 +21,7 @@
}}
manageHoverState
bind:hovered={$hoveredLane}
{hoverCursor}
on:click
paint={{
"fill-color": caseHelper(
Expand Down
2 changes: 1 addition & 1 deletion web/src/lane-editor/App.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
<RenderBoundary />
<RenderIntersectionPolygons />
<RenderIntersectionMarkings />
<RenderLanePolygons on:click={onClickLane} />
<RenderLanePolygons hoverCursor="pointer" on:click={onClickLane} />
<RenderLaneMarkings />
<GeoJSON data={wayGj}>
<FillLayer
Expand Down
4 changes: 2 additions & 2 deletions web/src/street-explorer/App.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -59,15 +59,15 @@
<Map>
<div bind:this={controlsContents}>
<RenderBoundary />
<RenderIntersectionPolygons>
<RenderIntersectionPolygons hoverCursor="pointer">
<Popup openOn="click" popupClass="popup" let:data let:close>
{#key data}
<IntersectionPopup {data} {close} />
{/key}
</Popup>
</RenderIntersectionPolygons>
<RenderIntersectionMarkings />
<RenderLanePolygons>
<RenderLanePolygons hoverCursor="pointer">
<Popup openOn="click" popupClass="popup" let:data let:close>
{#key data}
<LanePopup {data} {close} />
Expand Down

0 comments on commit b53073d

Please sign in to comment.