ublo-lib 1.31.42 → 1.31.43

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -20,6 +20,15 @@ function Tunnel({
20
20
  }
21
21
  };
22
22
  Utils.loadWidget("tunnel", patchedOptions, presets);
23
+ return () => {
24
+ const {
25
+ groundedTo
26
+ } = patchedOptions;
27
+ if (groundedTo) {
28
+ const container = document.querySelector(groundedTo);
29
+ container.innerHTML = "";
30
+ }
31
+ };
23
32
  }, [options, presets]);
24
33
  return children;
25
34
  }
@@ -2,10 +2,6 @@ export function loadWidget(widget, options = {}, presets = {}) {
2
2
  const isGroundedTo = ("groundedTo" in options);
3
3
  if (window.MseMLoaded) {
4
4
  window.MseM?.onLoad(() => {
5
- if (isGroundedTo) {
6
- const container = document.querySelector(options.groundedTo);
7
- container.innerHTML = "";
8
- }
9
5
  window.MseM[widget](options, presets);
10
6
  });
11
7
  } else {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ublo-lib",
3
- "version": "1.31.42",
3
+ "version": "1.31.43",
4
4
  "peerDependencies": {
5
5
  "dt-design-system": "^3.8.3",
6
6
  "leaflet": "^1.9.1",