diff --git a/ts/map/Map.vue b/ts/map/Map.vue index 30657708..6d60b5eb 100644 --- a/ts/map/Map.vue +++ b/ts/map/Map.vue @@ -25,15 +25,19 @@ import { ref, type Ref, shallowRef, + watch, } from "vue"; interface Props { bounds?: maplibregl.LngLatBounds; center?: maplibregl.LngLatLike; + cursor?: string; zoom?: number; } -const props = withDefaults(defineProps(), {}); +const props = withDefaults(defineProps(), { + cursor: "", +}); const mapDiv = ref(null); const map: Ref = shallowRef(null); @@ -150,4 +154,12 @@ onBeforeUnmount(() => { map.value.remove(); } }); +watch( + () => props.cursor, + (newCursor) => { + if (map.value && map.value.loaded()) { + map.value.getCanvas().style.cursor = newCursor; + } + }, +); diff --git a/ts/view/Dash.vue b/ts/view/Dash.vue index 854bd43d..0deca7b2 100644 --- a/ts/view/Dash.vue +++ b/ts/view/Dash.vue @@ -135,6 +135,7 @@