webdetta 0.1.221 → 0.1.223
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/package.json +1 -1
- package/packages/realdom/dynamic.js +7 -17
package/package.json
CHANGED
|
@@ -54,28 +54,18 @@ export const createList = (
|
|
|
54
54
|
elements.set(k, dom);
|
|
55
55
|
}
|
|
56
56
|
const move = (prevK, k) => {
|
|
57
|
-
const oldPrev = prev.get(k);
|
|
58
|
-
const oldNext = next.get(k);
|
|
59
|
-
|
|
60
|
-
if (oldPrev !== undefined && oldNext !== undefined) {
|
|
61
|
-
next.set(oldPrev, oldNext);
|
|
62
|
-
prev.set(oldNext, oldPrev);
|
|
63
|
-
}
|
|
64
|
-
|
|
65
57
|
const nextK = next.get(prevK);
|
|
66
|
-
|
|
67
58
|
if (prev.get(k) === prevK && nextK === k) return;
|
|
68
|
-
|
|
59
|
+
const oldPrevK = prev.get(k);
|
|
60
|
+
const oldNextK = next.get(k);
|
|
61
|
+
if (oldPrevK !== undefined) next.set(oldPrevK, oldNextK);
|
|
62
|
+
if (oldNextK !== undefined) prev.set(oldNextK, oldPrevK);
|
|
69
63
|
prev.set(k, prevK);
|
|
70
64
|
next.set(prevK, k);
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
prev.set(nextK, k);
|
|
74
|
-
next.set(k, nextK);
|
|
75
|
-
}
|
|
76
|
-
|
|
65
|
+
if (nextK !== undefined) prev.set(nextK, k);
|
|
66
|
+
next.set(k, nextK);
|
|
77
67
|
Element.appendAfter(elements.get(prevK), elements.get(k));
|
|
78
|
-
}
|
|
68
|
+
}
|
|
79
69
|
const disconnect = (k) => {
|
|
80
70
|
const prevK = prev.get(k);
|
|
81
71
|
const nextK = next.get(k);
|