svelte-dnd-action 0.9.25 → 0.9.27
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/README.md +2 -2
- package/dist/index.js +5 -1
- package/dist/index.mjs +5 -1
- package/package.json +1 -1
- package/src/pointerAction.js +5 -1
package/README.md
CHANGED
|
@@ -236,8 +236,8 @@ Feature flags allow controlling global optional behaviour. They were originally
|
|
|
236
236
|
In order to set a feature flag use:
|
|
237
237
|
|
|
238
238
|
```javascript
|
|
239
|
-
import {
|
|
240
|
-
|
|
239
|
+
import {setFeatureFlag, FEATURE_FLAG_NAMES} from "svelte-dnd-action";
|
|
240
|
+
setFeatureFlag(FEATURE_FLAG_NAMES.MY_FLAG, true);
|
|
241
241
|
```
|
|
242
242
|
|
|
243
243
|
Currently, there is only one flag: USE_COMPUTED_STYLE_INSTEAD_OF_BOUNDING_RECT, which defaults to false.
|
package/dist/index.js
CHANGED
|
@@ -1263,6 +1263,10 @@
|
|
|
1263
1263
|
if (!typeToDropZones.get(type).has(dropZoneEl)) {
|
|
1264
1264
|
typeToDropZones.get(type).add(dropZoneEl);
|
|
1265
1265
|
incrementActiveDropZoneCount();
|
|
1266
|
+
if (isWorkingOnPreviousDrag) {
|
|
1267
|
+
unWatchDraggedElement();
|
|
1268
|
+
watchDraggedElement();
|
|
1269
|
+
}
|
|
1266
1270
|
}
|
|
1267
1271
|
}
|
|
1268
1272
|
function unregisterDropZone(dropZoneEl, type) {
|
|
@@ -1766,7 +1770,6 @@
|
|
|
1766
1770
|
unregisterDropZone(node, config.type);
|
|
1767
1771
|
}
|
|
1768
1772
|
config.type = newType;
|
|
1769
|
-
registerDropZone(node, newType);
|
|
1770
1773
|
config.items = _toConsumableArray(items);
|
|
1771
1774
|
config.dragDisabled = dragDisabled;
|
|
1772
1775
|
config.morphDisabled = morphDisabled;
|
|
@@ -1810,6 +1813,7 @@
|
|
|
1810
1813
|
}
|
|
1811
1814
|
config.dropFromOthersDisabled = dropFromOthersDisabled;
|
|
1812
1815
|
dzToConfig.set(node, config);
|
|
1816
|
+
registerDropZone(node, newType);
|
|
1813
1817
|
var shadowElIdx = findShadowElementIdx(config.items);
|
|
1814
1818
|
for (var idx = 0; idx < node.children.length; idx++) {
|
|
1815
1819
|
var draggableEl = node.children[idx];
|
package/dist/index.mjs
CHANGED
|
@@ -1257,6 +1257,10 @@ function registerDropZone(dropZoneEl, type) {
|
|
|
1257
1257
|
if (!typeToDropZones.get(type).has(dropZoneEl)) {
|
|
1258
1258
|
typeToDropZones.get(type).add(dropZoneEl);
|
|
1259
1259
|
incrementActiveDropZoneCount();
|
|
1260
|
+
if (isWorkingOnPreviousDrag) {
|
|
1261
|
+
unWatchDraggedElement();
|
|
1262
|
+
watchDraggedElement();
|
|
1263
|
+
}
|
|
1260
1264
|
}
|
|
1261
1265
|
}
|
|
1262
1266
|
function unregisterDropZone(dropZoneEl, type) {
|
|
@@ -1760,7 +1764,6 @@ function dndzone(node, options) {
|
|
|
1760
1764
|
unregisterDropZone(node, config.type);
|
|
1761
1765
|
}
|
|
1762
1766
|
config.type = newType;
|
|
1763
|
-
registerDropZone(node, newType);
|
|
1764
1767
|
config.items = _toConsumableArray(items);
|
|
1765
1768
|
config.dragDisabled = dragDisabled;
|
|
1766
1769
|
config.morphDisabled = morphDisabled;
|
|
@@ -1804,6 +1807,7 @@ function dndzone(node, options) {
|
|
|
1804
1807
|
}
|
|
1805
1808
|
config.dropFromOthersDisabled = dropFromOthersDisabled;
|
|
1806
1809
|
dzToConfig.set(node, config);
|
|
1810
|
+
registerDropZone(node, newType);
|
|
1807
1811
|
var shadowElIdx = findShadowElementIdx(config.items);
|
|
1808
1812
|
for (var idx = 0; idx < node.children.length; idx++) {
|
|
1809
1813
|
var draggableEl = node.children[idx];
|
package/package.json
CHANGED
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
"dist"
|
|
44
44
|
],
|
|
45
45
|
"description": "*An awesome drag and drop library for Svelte 3 (not using the browser's built-in dnd, thanks god): Rich animations, nested containers, touch support and more *",
|
|
46
|
-
"version": "0.9.
|
|
46
|
+
"version": "0.9.27",
|
|
47
47
|
"repository": {
|
|
48
48
|
"type": "git",
|
|
49
49
|
"url": "git+https://github.com/isaacHagoel/svelte-dnd-action.git"
|
package/src/pointerAction.js
CHANGED
|
@@ -73,6 +73,10 @@ function registerDropZone(dropZoneEl, type) {
|
|
|
73
73
|
if (!typeToDropZones.get(type).has(dropZoneEl)) {
|
|
74
74
|
typeToDropZones.get(type).add(dropZoneEl);
|
|
75
75
|
incrementActiveDropZoneCount();
|
|
76
|
+
if (isWorkingOnPreviousDrag) {
|
|
77
|
+
unWatchDraggedElement();
|
|
78
|
+
watchDraggedElement();
|
|
79
|
+
}
|
|
76
80
|
}
|
|
77
81
|
}
|
|
78
82
|
function unregisterDropZone(dropZoneEl, type) {
|
|
@@ -458,7 +462,6 @@ export function dndzone(node, options) {
|
|
|
458
462
|
unregisterDropZone(node, config.type);
|
|
459
463
|
}
|
|
460
464
|
config.type = newType;
|
|
461
|
-
registerDropZone(node, newType);
|
|
462
465
|
config.items = [...items];
|
|
463
466
|
config.dragDisabled = dragDisabled;
|
|
464
467
|
config.morphDisabled = morphDisabled;
|
|
@@ -509,6 +512,7 @@ export function dndzone(node, options) {
|
|
|
509
512
|
config.dropFromOthersDisabled = dropFromOthersDisabled;
|
|
510
513
|
|
|
511
514
|
dzToConfig.set(node, config);
|
|
515
|
+
registerDropZone(node, newType);
|
|
512
516
|
const shadowElIdx = findShadowElementIdx(config.items);
|
|
513
517
|
for (let idx = 0; idx < node.children.length; idx++) {
|
|
514
518
|
const draggableEl = node.children[idx];
|