diff options
-rw-r--r-- | src/MenuItem.mjs | 4 | ||||
-rw-r--r-- | src/dumbymap.mjs | 2 | ||||
-rw-r--r-- | src/marker.mjs | 6 |
3 files changed, 8 insertions, 4 deletions
diff --git a/src/MenuItem.mjs b/src/MenuItem.mjs index 64e82d1..7b1f41e 100644 --- a/src/MenuItem.mjs +++ b/src/MenuItem.mjs | |||
@@ -1,5 +1,7 @@ | |||
1 | import { shiftByWindow } from './utils.mjs' | 1 | import { shiftByWindow } from './utils.mjs' |
2 | /* eslint-disable no-unused-vars */ | ||
2 | import { GeoLink, removeLeaderLines } from './Link.mjs' | 3 | import { GeoLink, removeLeaderLines } from './Link.mjs' |
4 | /* eslint-enable */ | ||
3 | import * as markers from './marker.mjs' | 5 | import * as markers from './marker.mjs' |
4 | 6 | ||
5 | /** | 7 | /** |
@@ -465,7 +467,7 @@ export const setGeoLinkType = (link) => new Folder({ | |||
465 | .map(([key, value]) => { | 467 | .map(([key, value]) => { |
466 | return setGeoLinkTypeItem({ | 468 | return setGeoLinkTypeItem({ |
467 | link, | 469 | link, |
468 | title: key.at(0).toUpperCase() + key.slice(1), | 470 | title: value.name ?? key.at(0).toUpperCase() + key.slice(1), |
469 | innerHTML: value.html, | 471 | innerHTML: value.html, |
470 | type: key, | 472 | type: key, |
471 | style: 'min-width: unset; width: fit-content; padding: 10px; margin: auto auto;', | 473 | style: 'min-width: unset; width: fit-content; padding: 10px; margin: auto auto;', |
diff --git a/src/dumbymap.mjs b/src/dumbymap.mjs index bb3737b..3200a05 100644 --- a/src/dumbymap.mjs +++ b/src/dumbymap.mjs | |||
@@ -543,7 +543,7 @@ export const generateMaps = (container, { | |||
543 | menu.remove() | 543 | menu.remove() |
544 | } | 544 | } |
545 | container.appendChild(menu) | 545 | container.appendChild(menu) |
546 | new MutationObserver(() => { | 546 | new window.MutationObserver(() => { |
547 | menu.style.display = 'block' | 547 | menu.style.display = 'block' |
548 | menu.style.left = (e.clientX - menu.offsetParent.offsetLeft + 10) + 'px' | 548 | menu.style.left = (e.clientX - menu.offsetParent.offsetLeft + 10) + 'px' |
549 | menu.style.top = (e.clientY - menu.offsetParent.offsetTop + 5) + 'px' | 549 | menu.style.top = (e.clientY - menu.offsetParent.offsetTop + 5) + 'px' |
diff --git a/src/marker.mjs b/src/marker.mjs index 7eb5148..53d5c90 100644 --- a/src/marker.mjs +++ b/src/marker.mjs | |||
@@ -66,7 +66,8 @@ export const heliport = { | |||
66 | anchor: [13.5, 13.5], | 66 | anchor: [13.5, 13.5], |
67 | } | 67 | } |
68 | 68 | ||
69 | export const hot_spring = { | 69 | export const hotSpring = { |
70 | name: 'Hot Spring', | ||
70 | html: '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 27 27" height="27" width="27"><rect fill="none" x="0" y="0" width="27" height="27"></rect><rect x="2" y="2" rx="11.5" ry="11.5" width="23" height="23" stroke="#000" style="stroke-linejoin:round;stroke-miterlimit:4;" fill="#000" stroke-width="4"></rect><rect x="2" y="2" width="23" height="23" rx="11.5" ry="11.5" fill="#ffc7c7"></rect><path fill="#000" transform="translate(6 6)" d="M13.536,12.008h0a1.584,1.584,0,0,0-1.105.416l-.437.407a.662.662,0,0,1-.928,0c-.139-.119-.269-.258-.409-.387a1.679,1.679,0,0,0-2.275,0c-.148.129-.288.278-.436.407a.663.663,0,0,1-.929,0c-.148-.129-.288-.278-.436-.407a1.68,1.68,0,0,0-2.266,0c-.139.129-.269.268-.408.387a.86.86,0,0,1-.279.159.748.748,0,0,1-.743-.248,5.9,5.9,0,0,0-.733-.576,1.089,1.089,0,0,0-.632-.158H1.464a.5.5,0,0,0,0,.992h0a.847.847,0,0,1,.6.307l.334.258a1.676,1.676,0,0,0,2.164.06c.176-.139.334-.317.51-.466a.663.663,0,0,1,.929,0l.362.347a1.687,1.687,0,0,0,2.284.07c.14-.11.251-.248.39-.367A.683.683,0,0,1,10,13.15c.017.015.422.406.422.406a1.667,1.667,0,0,0,1.634.367,1.961,1.961,0,0,0,.928-.6A.923.923,0,0,1,13.536,13h0a.5.5,0,0,0,0-.992ZM7.464,2.047A2.871,2.871,0,0,0,6.87,6.583a1.785,1.785,0,0,1,.562,1.694C7.119,9.17,6.342,10,6.774,11c.286-.971,1.367-1.291,1.861-2.124.99-1.565-.155-3-1.03-4.245C7.144,3.323,8.824,2.32,8.225,1A2.2,2.2,0,0,1,7.464,2.047Zm2.946,1.5a2.262,2.262,0,0,0,.525,3.106,1.059,1.059,0,0,1,.52,1.067c-.319.741-1.088,1.408-.686,2.28.374-.87,1.016-.644,1.817-1.546a2.261,2.261,0,0,0-.519-3.109,1.059,1.059,0,0,1-.527-1.067c.318-.741,1.088-1.406.687-2.278C11.855,2.87,11.211,2.645,10.41,3.547Zm-8,0a2.262,2.262,0,0,0,.525,3.106,1.059,1.059,0,0,1,.52,1.067c-.319.741-1.088,1.408-.686,2.28.374-.87,1.016-.644,1.817-1.546a2.261,2.261,0,0,0-.519-3.109A1.059,1.059,0,0,1,3.54,4.278C3.858,3.537,4.628,2.872,4.227,2,3.855,2.87,3.211,2.645,2.41,3.547Z"></path></svg>', | 71 | html: '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 27 27" height="27" width="27"><rect fill="none" x="0" y="0" width="27" height="27"></rect><rect x="2" y="2" rx="11.5" ry="11.5" width="23" height="23" stroke="#000" style="stroke-linejoin:round;stroke-miterlimit:4;" fill="#000" stroke-width="4"></rect><rect x="2" y="2" width="23" height="23" rx="11.5" ry="11.5" fill="#ffc7c7"></rect><path fill="#000" transform="translate(6 6)" d="M13.536,12.008h0a1.584,1.584,0,0,0-1.105.416l-.437.407a.662.662,0,0,1-.928,0c-.139-.119-.269-.258-.409-.387a1.679,1.679,0,0,0-2.275,0c-.148.129-.288.278-.436.407a.663.663,0,0,1-.929,0c-.148-.129-.288-.278-.436-.407a1.68,1.68,0,0,0-2.266,0c-.139.129-.269.268-.408.387a.86.86,0,0,1-.279.159.748.748,0,0,1-.743-.248,5.9,5.9,0,0,0-.733-.576,1.089,1.089,0,0,0-.632-.158H1.464a.5.5,0,0,0,0,.992h0a.847.847,0,0,1,.6.307l.334.258a1.676,1.676,0,0,0,2.164.06c.176-.139.334-.317.51-.466a.663.663,0,0,1,.929,0l.362.347a1.687,1.687,0,0,0,2.284.07c.14-.11.251-.248.39-.367A.683.683,0,0,1,10,13.15c.017.015.422.406.422.406a1.667,1.667,0,0,0,1.634.367,1.961,1.961,0,0,0,.928-.6A.923.923,0,0,1,13.536,13h0a.5.5,0,0,0,0-.992ZM7.464,2.047A2.871,2.871,0,0,0,6.87,6.583a1.785,1.785,0,0,1,.562,1.694C7.119,9.17,6.342,10,6.774,11c.286-.971,1.367-1.291,1.861-2.124.99-1.565-.155-3-1.03-4.245C7.144,3.323,8.824,2.32,8.225,1A2.2,2.2,0,0,1,7.464,2.047Zm2.946,1.5a2.262,2.262,0,0,0,.525,3.106,1.059,1.059,0,0,1,.52,1.067c-.319.741-1.088,1.408-.686,2.28.374-.87,1.016-.644,1.817-1.546a2.261,2.261,0,0,0-.519-3.109,1.059,1.059,0,0,1-.527-1.067c.318-.741,1.088-1.406.687-2.278C11.855,2.87,11.211,2.645,10.41,3.547Zm-8,0a2.262,2.262,0,0,0,.525,3.106,1.059,1.059,0,0,1,.52,1.067c-.319.741-1.088,1.408-.686,2.28.374-.87,1.016-.644,1.817-1.546a2.261,2.261,0,0,0-.519-3.109A1.059,1.059,0,0,1,3.54,4.278C3.858,3.537,4.628,2.872,4.227,2,3.855,2.87,3.211,2.645,2.41,3.547Z"></path></svg>', |
71 | size: [27, 27], | 72 | size: [27, 27], |
72 | anchor: [13.5, 13.5], | 73 | anchor: [13.5, 13.5], |
@@ -126,7 +127,8 @@ export const triangle = { | |||
126 | anchor: [13.5, 13.5], | 127 | anchor: [13.5, 13.5], |
127 | } | 128 | } |
128 | 129 | ||
129 | export const triangle_white = { | 130 | export const triangleWhite = { |
131 | name: 'White Triangle', | ||
130 | html: '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 27 27" height="27" width="27"><rect fill="none" x="0" y="0" width="27" height="27"></rect><rect x="2" y="2" rx="11.5" ry="11.5" width="23" height="23" stroke="#000" style="stroke-linejoin:round;stroke-miterlimit:4;" fill="#000" stroke-width="4"></rect><rect x="2" y="2" width="23" height="23" rx="11.5" ry="11.5" fill="#ffc7c7"></rect><path fill="#000" transform="translate(6 6)" d="M7.5243,1.5004 C7.2429,1.4913,6.9787,1.6423,6.8336,1.8952l-5.5,9.8692C1.0218,12.3078,1.395,12.9999,2,13h11 c0.605-0.0001,0.9782-0.6922,0.6664-1.2355l-5.5-9.8692C8.0302,1.6579,7.7884,1.5092,7.5243,1.5004z M7.5,3.8993l4.1267,7.4704 H3.3733L7.5,3.8993z"></path></svg>', | 132 | html: '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 27 27" height="27" width="27"><rect fill="none" x="0" y="0" width="27" height="27"></rect><rect x="2" y="2" rx="11.5" ry="11.5" width="23" height="23" stroke="#000" style="stroke-linejoin:round;stroke-miterlimit:4;" fill="#000" stroke-width="4"></rect><rect x="2" y="2" width="23" height="23" rx="11.5" ry="11.5" fill="#ffc7c7"></rect><path fill="#000" transform="translate(6 6)" d="M7.5243,1.5004 C7.2429,1.4913,6.9787,1.6423,6.8336,1.8952l-5.5,9.8692C1.0218,12.3078,1.395,12.9999,2,13h11 c0.605-0.0001,0.9782-0.6922,0.6664-1.2355l-5.5-9.8692C8.0302,1.6579,7.7884,1.5092,7.5243,1.5004z M7.5,3.8993l4.1267,7.4704 H3.3733L7.5,3.8993z"></path></svg>', |
131 | size: [27, 27], | 133 | size: [27, 27], |
132 | anchor: [13.5, 13.5], | 134 | anchor: [13.5, 13.5], |