svelte-dnd-action 0.9.48 → 0.9.50
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 +4 -2
- package/dist/index.mjs +4 -2
- package/package.json +1 -1
- package/src/helpers/svelteNodeClone.js +3 -1
- package/src/pointerAction.js +1 -1
package/dist/index.js
CHANGED
|
@@ -1032,7 +1032,9 @@
|
|
|
1032
1032
|
var clonedCanvas = clonedCanvases[_i];
|
|
1033
1033
|
clonedCanvas.width = canvas.width;
|
|
1034
1034
|
clonedCanvas.height = canvas.height;
|
|
1035
|
-
|
|
1035
|
+
if (canvas.width > 0 && canvas.height > 0) {
|
|
1036
|
+
clonedCanvas.getContext("2d").drawImage(canvas, 0, 0);
|
|
1037
|
+
}
|
|
1036
1038
|
}
|
|
1037
1039
|
}
|
|
1038
1040
|
return cloned;
|
|
@@ -1878,7 +1880,7 @@
|
|
|
1878
1880
|
config.dropFromOthersDisabled = dropFromOthersDisabled;
|
|
1879
1881
|
dzToConfig.set(node, config);
|
|
1880
1882
|
registerDropZone(node, newType);
|
|
1881
|
-
var shadowElIdx = findShadowElementIdx(config.items);
|
|
1883
|
+
var shadowElIdx = isWorkingOnPreviousDrag ? findShadowElementIdx(config.items) : -1;
|
|
1882
1884
|
for (var idx = 0; idx < node.children.length; idx++) {
|
|
1883
1885
|
var draggableEl = node.children[idx];
|
|
1884
1886
|
styleDraggable(draggableEl, dragDisabled);
|
package/dist/index.mjs
CHANGED
|
@@ -1026,7 +1026,9 @@ function svelteNodeClone(el) {
|
|
|
1026
1026
|
var clonedCanvas = clonedCanvases[_i];
|
|
1027
1027
|
clonedCanvas.width = canvas.width;
|
|
1028
1028
|
clonedCanvas.height = canvas.height;
|
|
1029
|
-
|
|
1029
|
+
if (canvas.width > 0 && canvas.height > 0) {
|
|
1030
|
+
clonedCanvas.getContext("2d").drawImage(canvas, 0, 0);
|
|
1031
|
+
}
|
|
1030
1032
|
}
|
|
1031
1033
|
}
|
|
1032
1034
|
return cloned;
|
|
@@ -1872,7 +1874,7 @@ function dndzone(node, options) {
|
|
|
1872
1874
|
config.dropFromOthersDisabled = dropFromOthersDisabled;
|
|
1873
1875
|
dzToConfig.set(node, config);
|
|
1874
1876
|
registerDropZone(node, newType);
|
|
1875
|
-
var shadowElIdx = findShadowElementIdx(config.items);
|
|
1877
|
+
var shadowElIdx = isWorkingOnPreviousDrag ? findShadowElementIdx(config.items) : -1;
|
|
1876
1878
|
for (var idx = 0; idx < node.children.length; idx++) {
|
|
1877
1879
|
var draggableEl = node.children[idx];
|
|
1878
1880
|
styleDraggable(draggableEl, dragDisabled);
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "svelte-dnd-action",
|
|
3
3
|
"description": "*An awesome drag and drop library for Svelte 3 and 4 (not using the browser's built-in dnd, thanks god): Rich animations, nested containers, touch support and more *",
|
|
4
|
-
"version": "0.9.
|
|
4
|
+
"version": "0.9.50",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
7
|
"url": "git+https://github.com/isaacHagoel/svelte-dnd-action.git"
|
|
@@ -38,7 +38,9 @@ export function svelteNodeClone(el) {
|
|
|
38
38
|
const clonedCanvas = clonedCanvases[i];
|
|
39
39
|
clonedCanvas.width = canvas.width;
|
|
40
40
|
clonedCanvas.height = canvas.height;
|
|
41
|
-
|
|
41
|
+
if (canvas.width > 0 && canvas.height > 0) {
|
|
42
|
+
clonedCanvas.getContext("2d").drawImage(canvas, 0, 0);
|
|
43
|
+
}
|
|
42
44
|
}
|
|
43
45
|
}
|
|
44
46
|
|
package/src/pointerAction.js
CHANGED
|
@@ -526,7 +526,7 @@ export function dndzone(node, options) {
|
|
|
526
526
|
|
|
527
527
|
dzToConfig.set(node, config);
|
|
528
528
|
registerDropZone(node, newType);
|
|
529
|
-
const shadowElIdx = findShadowElementIdx(config.items);
|
|
529
|
+
const shadowElIdx = isWorkingOnPreviousDrag ? findShadowElementIdx(config.items) : -1;
|
|
530
530
|
for (let idx = 0; idx < node.children.length; idx++) {
|
|
531
531
|
const draggableEl = node.children[idx];
|
|
532
532
|
styleDraggable(draggableEl, dragDisabled);
|