diff options
Diffstat (limited to 'addon/index.mjs')
-rw-r--r-- | addon/index.mjs | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/addon/index.mjs b/addon/index.mjs index 77716b6..4de11e0 100644 --- a/addon/index.mjs +++ b/addon/index.mjs | |||
@@ -34,10 +34,20 @@ const simpleRender = window.mapclay.renderWith(config => ({ | |||
34 | }, | 34 | }, |
35 | })) | 35 | })) |
36 | 36 | ||
37 | window.generateMaps(document.querySelector('main') ?? document.body, { | 37 | if (!document.querySelector('.Dumby')) { |
38 | crs: url.searchParams.get('crs') ?? 'EPSG:4326', | 38 | window.generateMaps(document.querySelector('main') ?? document.body, { |
39 | addBlocks, | 39 | crs: url.searchParams.get('crs') ?? 'EPSG:4326', |
40 | initialLayout: 'sticky', | 40 | addBlocks, |
41 | render: simpleRender, | 41 | initialLayout: 'sticky', |
42 | autoMap: true, | 42 | render: simpleRender, |
43 | autoMap: true, | ||
44 | }) | ||
45 | } | ||
46 | |||
47 | new window.MutationObserver((ms) => { | ||
48 | for (const m of ms) { | ||
49 | console.log(m) | ||
50 | } | ||
51 | }).observe(document.querySelector('#doc'), { | ||
52 | childList: true, | ||
43 | }) | 53 | }) |