aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/dumbyUtils.mjs
diff options
context:
space:
mode:
Diffstat (limited to 'src/dumbyUtils.mjs')
-rw-r--r--src/dumbyUtils.mjs8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/dumbyUtils.mjs b/src/dumbyUtils.mjs
index 83d24c0..4b2ae2c 100644
--- a/src/dumbyUtils.mjs
+++ b/src/dumbyUtils.mjs
@@ -121,7 +121,7 @@ const addLeaderLine = (link, target) => {
121 start: link, 121 start: link,
122 end: target, 122 end: target,
123 hide: true, 123 hide: true,
124 middleLabel: link.url.searchParams.get('text'), 124 middleLabel: link.title,
125 path: 'magnet', 125 path: 'magnet',
126 }) 126 })
127 line.show('draw', { duration: 300 }) 127 line.show('draw', { duration: 300 })
@@ -270,12 +270,14 @@ export const addAnchorByPoint = ({
270 while (anchorName !== null && !validateAnchorName(anchorName)) 270 while (anchorName !== null && !validateAnchorName(anchorName))
271 if (anchorName === null) return 271 if (anchorName === null) return
272 272
273 const link = `geo:${y},${x}?xy=${x},${y}&id=${map.id}&text=${anchorName}` 273 const desc = window.prompt("Description", anchorName) ?? anchorName
274
275 const link = `geo:${y},${x}?xy=${x},${y}&id=${map.id}`
274 map.renderer.addMarker({ 276 map.renderer.addMarker({
275 xy: [x, y], 277 xy: [x, y],
276 title: `${map.id}@${x},${y}`, 278 title: `${map.id}@${x},${y}`,
277 type: 'circle', 279 type: 'circle',
278 }) 280 })
279 281
280 return { ref: anchorName, link } 282 return { ref: anchorName, link, title: desc }
281} 283}