@miragon/modeler-shell 0.2.0 → 0.2.1

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.
package/dist/index.js CHANGED
@@ -4,7 +4,7 @@ import {
4
4
  iconElement,
5
5
  iconMarkup,
6
6
  mountShell
7
- } from "./chunk-66HCSJNY.js";
7
+ } from "./chunk-A4YGKH4Y.js";
8
8
  import {
9
9
  APPEARANCE_STORAGE_KEY,
10
10
  CHROME_ISLANDS,
@@ -2199,6 +2199,10 @@ function createTooltip({ root, layer, id }) {
2199
2199
  let warmUntil = 0;
2200
2200
  let pressed;
2201
2201
  const detachers = /* @__PURE__ */ new Set();
2202
+ const resizeObserver = typeof ResizeObserver === "function" ? new ResizeObserver(() => {
2203
+ if (shown) place(shown.control);
2204
+ }) : void 0;
2205
+ resizeObserver?.observe(element);
2202
2206
  function cancelPending() {
2203
2207
  if (pending) clearTimeout(pending.timer);
2204
2208
  pending = void 0;
@@ -2366,6 +2370,7 @@ function createTooltip({ root, layer, id }) {
2366
2370
  destroy() {
2367
2371
  hide();
2368
2372
  for (const detach of [...detachers]) detach();
2373
+ resizeObserver?.disconnect();
2369
2374
  element.remove();
2370
2375
  }
2371
2376
  };