svelte-tweakpane-ui 1.3.2 → 1.3.3
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/extra/Element.svelte +1 -1
- package/dist/utils.js +6 -1
- package/package.json +1 -1
package/dist/utils.js
CHANGED
|
@@ -84,7 +84,12 @@ export function getElementIndex(element) {
|
|
|
84
84
|
// eslint-disable-next-line @typescript-eslint/ban-types
|
|
85
85
|
let sibling = element;
|
|
86
86
|
while ((sibling = sibling.previousElementSibling) !== null) {
|
|
87
|
-
|
|
87
|
+
// The Element component can add extra stuff to the DOM which will mess up counting...
|
|
88
|
+
// So we add an extra class to its wrapper and don't let it increment the index.
|
|
89
|
+
// This was the cause of https://github.com/kitschpatrol/svelte-tweakpane-ui/issues/18
|
|
90
|
+
if (!sibling.classList.contains('skip-element-index')) {
|
|
91
|
+
index++;
|
|
92
|
+
}
|
|
88
93
|
}
|
|
89
94
|
return index;
|
|
90
95
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "svelte-tweakpane-ui",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.3",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "A Svelte component library wrapping UI elements from Tweakpane, plus some additional functionality for convenience and flexibility.",
|
|
6
6
|
"repository": {
|