aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/dumbyUtils.mjs
diff options
context:
space:
mode:
Diffstat (limited to 'src/dumbyUtils.mjs')
-rw-r--r--src/dumbyUtils.mjs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/dumbyUtils.mjs b/src/dumbyUtils.mjs
index 42a51bc..8fe23eb 100644
--- a/src/dumbyUtils.mjs
+++ b/src/dumbyUtils.mjs
@@ -93,7 +93,8 @@ export function removeBlockFocus () {
93 * @param {HTMLAnchorElement} link 93 * @param {HTMLAnchorElement} link
94 * @return {HTMLElement[]} markers 94 * @return {HTMLElement[]} markers
95 */ 95 */
96const getMarkersFromMaps = link => { 96export const getMarkersFromMaps = link => {
97 const params = new URLSearchParams(link.search)
97 const maps = Array.from( 98 const maps = Array.from(
98 link.closest('.Dumby') 99 link.closest('.Dumby')
99 .querySelectorAll('.mapclay[data-render="fulfilled"]'), 100 .querySelectorAll('.mapclay[data-render="fulfilled"]'),
@@ -107,7 +108,7 @@ const getMarkersFromMaps = link => {
107 const marker = map.querySelector(`.marker[data-xy="${lonLat}"]`) ?? 108 const marker = map.querySelector(`.marker[data-xy="${lonLat}"]`) ??
108 renderer.addMarker({ 109 renderer.addMarker({
109 xy: lonLat, 110 xy: lonLat,
110 type: link.type, 111 type: params.get('type') ?? null,
111 }) 112 })
112 marker.dataset.xy = lonLat 113 marker.dataset.xy = lonLat
113 marker.title = new URLSearchParams(link.search).get('xy') ?? lonLat 114 marker.title = new URLSearchParams(link.search).get('xy') ?? lonLat
@@ -167,7 +168,6 @@ export const createGeoLink = (link) => {
167 link.classList.remove('not-geolink') 168 link.classList.remove('not-geolink')
168 // TODO refactor as data attribute 169 // TODO refactor as data attribute
169 link.targets = params.get('id')?.split(',') ?? null 170 link.targets = params.get('id')?.split(',') ?? null
170 link.type = params.get('type') ?? null
171 link.title = 'Left-Click to move Camera, Middle-Click to clean anchor' 171 link.title = 'Left-Click to move Camera, Middle-Click to clean anchor'
172 172
173 link.lines = [] 173 link.lines = []