diff options
author | Hsieh Chin Fan <pham@topo.tw> | 2024-10-31 17:09:51 +0800 |
---|---|---|
committer | Hsieh Chin Fan <pham@topo.tw> | 2024-11-03 14:01:05 +0800 |
commit | 11ff731337c6823e74821d06457972c6d0528c34 (patch) | |
tree | 4733b9b6172fd53f19de9bf454ef7da4e85f8f78 /src/dumbymap.mjs | |
parent | 7ee1ad61627f9a2af04f080cfa95a30f3c8e4525 (diff) |
refactor: getMarkersFromMaps
Make arugments more general, not only GeoLink
Diffstat (limited to 'src/dumbymap.mjs')
-rw-r--r-- | src/dumbymap.mjs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/dumbymap.mjs b/src/dumbymap.mjs index 9bc1da7..77f3515 100644 --- a/src/dumbymap.mjs +++ b/src/dumbymap.mjs | |||
@@ -6,7 +6,7 @@ import MarkdownItInjectLinenumbers from 'markdown-it-inject-linenumbers' | |||
6 | import * as mapclay from 'mapclay' | 6 | import * as mapclay from 'mapclay' |
7 | import { onRemove, animateRectTransition, throttle, debounce, shiftByWindow } from './utils' | 7 | import { onRemove, animateRectTransition, throttle, debounce, shiftByWindow } from './utils' |
8 | import { Layout, SideBySide, Overlay, Sticky } from './Layout' | 8 | import { Layout, SideBySide, Overlay, Sticky } from './Layout' |
9 | import { GeoLink, DocLink, getMarkersFromMaps } from './Link.mjs' | 9 | import { GeoLink, DocLink, getMarkersByGeoLink } from './Link.mjs' |
10 | import * as utils from './dumbyUtils' | 10 | import * as utils from './dumbyUtils' |
11 | import * as menuItem from './MenuItem' | 11 | import * as menuItem from './MenuItem' |
12 | import PlainModal from 'plain-modal' | 12 | import PlainModal from 'plain-modal' |
@@ -584,7 +584,7 @@ export const generateMaps = (container, { | |||
584 | menu.appendChild(menuItem.Item({ | 584 | menu.appendChild(menuItem.Item({ |
585 | innerHTML: '<strong style="color: red;">DELETE</strong>', | 585 | innerHTML: '<strong style="color: red;">DELETE</strong>', |
586 | onclick: () => { | 586 | onclick: () => { |
587 | getMarkersFromMaps(geoLink) | 587 | getMarkersByGeoLink(geoLink) |
588 | .forEach(m => m.remove()) | 588 | .forEach(m => m.remove()) |
589 | geoLink.replaceWith( | 589 | geoLink.replaceWith( |
590 | document.createTextNode(geoLink.textContent), | 590 | document.createTextNode(geoLink.textContent), |
@@ -595,7 +595,7 @@ export const generateMaps = (container, { | |||
595 | menu.appendChild(menuItem.Item({ | 595 | menu.appendChild(menuItem.Item({ |
596 | innerHTML: '<strong style="color: red;">DELETE</strong>', | 596 | innerHTML: '<strong style="color: red;">DELETE</strong>', |
597 | onclick: () => { | 597 | onclick: () => { |
598 | getMarkersFromMaps(geoLink) | 598 | getMarkersByGeoLink(geoLink) |
599 | .forEach(m => m.remove()) | 599 | .forEach(m => m.remove()) |
600 | 600 | ||
601 | const sibling = [ | 601 | const sibling = [ |