@txstate-mws/svelte-components 1.6.3 → 1.6.4

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.
@@ -27,6 +27,8 @@ export function glue(el, { target, align = 'auto', cover = false, gap = 0, adjus
27
27
  const tmpRect = fixedParent.getBoundingClientRect();
28
28
  fixedRect = { left: tmpRect.left, right: window.innerWidth - tmpRect.right, top: tmpRect.top, bottom: window.innerHeight - tmpRect.bottom };
29
29
  }
30
+ if (!target)
31
+ return;
30
32
  const tmpRect = target.getBoundingClientRect();
31
33
  const rect = { left: tmpRect.left - fixedRect.left, right: window.innerWidth - tmpRect.right - fixedRect.right, top: tmpRect.top - fixedRect.top, bottom: window.innerHeight - tmpRect.bottom - fixedRect.bottom, width: tmpRect.width, height: tmpRect.height };
32
34
  if (equal(rect, lastrect))
@@ -100,8 +102,10 @@ export function glue(el, { target, align = 'auto', cover = false, gap = 0, adjus
100
102
  target = utarget;
101
103
  if (!target)
102
104
  el.style.removeProperty('position');
103
- else
105
+ else {
104
106
  el.style.position = 'fixed';
107
+ reposition();
108
+ }
105
109
  }
106
110
  },
107
111
  destroy() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@txstate-mws/svelte-components",
3
- "version": "1.6.3",
3
+ "version": "1.6.4",
4
4
  "description": "Svelte components that are generically useful.",
5
5
  "scripts": {
6
6
  "prepublishOnly": "svelte-package",