svelte-dnd-action 0.9.57 → 0.9.58
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 +7 -8
- package/dist/index.mjs +7 -8
- package/package.json +1 -1
- package/src/pointerAction.js +7 -8
package/dist/index.js
CHANGED
|
@@ -1822,19 +1822,18 @@
|
|
|
1822
1822
|
|
|
1823
1823
|
// creating the draggable element
|
|
1824
1824
|
draggedEl = createDraggedElementFrom(originalDragTarget, centreDraggedOnCursor && currentMousePosition);
|
|
1825
|
-
|
|
1826
|
-
|
|
1825
|
+
originDropZoneRoot.appendChild(draggedEl);
|
|
1827
1826
|
// We will keep the original dom node in the dom because touch events keep firing on it, we want to re-add it after the framework removes it
|
|
1828
1827
|
function keepOriginalElementInDom() {
|
|
1829
|
-
if (!
|
|
1830
|
-
|
|
1831
|
-
// to prevent the outline from disappearing
|
|
1832
|
-
draggedEl.focus();
|
|
1833
|
-
watchDraggedElement();
|
|
1834
|
-
hideElement(originalDragTarget);
|
|
1828
|
+
if (!originalDragTarget.parentElement) {
|
|
1829
|
+
originalDragTarget.setAttribute(ORIGINAL_DRAGGED_ITEM_MARKER_ATTRIBUTE, true);
|
|
1835
1830
|
originDropZoneRoot.appendChild(originalDragTarget);
|
|
1831
|
+
hideElement(originalDragTarget);
|
|
1836
1832
|
// after the removal of the original element we can give the shadow element the original item id so that the host zone can find it and render it correctly if it does lookups by id
|
|
1837
1833
|
shadowElData[ITEM_ID_KEY] = draggedElData[ITEM_ID_KEY];
|
|
1834
|
+
// to prevent the outline from disappearing
|
|
1835
|
+
draggedEl.focus();
|
|
1836
|
+
watchDraggedElement();
|
|
1838
1837
|
} else {
|
|
1839
1838
|
window.requestAnimationFrame(keepOriginalElementInDom);
|
|
1840
1839
|
}
|
package/dist/index.mjs
CHANGED
|
@@ -1816,19 +1816,18 @@ function dndzone$2(node, options) {
|
|
|
1816
1816
|
|
|
1817
1817
|
// creating the draggable element
|
|
1818
1818
|
draggedEl = createDraggedElementFrom(originalDragTarget, centreDraggedOnCursor && currentMousePosition);
|
|
1819
|
-
|
|
1820
|
-
|
|
1819
|
+
originDropZoneRoot.appendChild(draggedEl);
|
|
1821
1820
|
// We will keep the original dom node in the dom because touch events keep firing on it, we want to re-add it after the framework removes it
|
|
1822
1821
|
function keepOriginalElementInDom() {
|
|
1823
|
-
if (!
|
|
1824
|
-
|
|
1825
|
-
// to prevent the outline from disappearing
|
|
1826
|
-
draggedEl.focus();
|
|
1827
|
-
watchDraggedElement();
|
|
1828
|
-
hideElement(originalDragTarget);
|
|
1822
|
+
if (!originalDragTarget.parentElement) {
|
|
1823
|
+
originalDragTarget.setAttribute(ORIGINAL_DRAGGED_ITEM_MARKER_ATTRIBUTE, true);
|
|
1829
1824
|
originDropZoneRoot.appendChild(originalDragTarget);
|
|
1825
|
+
hideElement(originalDragTarget);
|
|
1830
1826
|
// after the removal of the original element we can give the shadow element the original item id so that the host zone can find it and render it correctly if it does lookups by id
|
|
1831
1827
|
shadowElData[ITEM_ID_KEY] = draggedElData[ITEM_ID_KEY];
|
|
1828
|
+
// to prevent the outline from disappearing
|
|
1829
|
+
draggedEl.focus();
|
|
1830
|
+
watchDraggedElement();
|
|
1832
1831
|
} else {
|
|
1833
1832
|
window.requestAnimationFrame(keepOriginalElementInDom);
|
|
1834
1833
|
}
|
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.58",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
7
|
"url": "git+https://github.com/isaacHagoel/svelte-dnd-action.git"
|
package/src/pointerAction.js
CHANGED
|
@@ -433,19 +433,18 @@ export function dndzone(node, options) {
|
|
|
433
433
|
|
|
434
434
|
// creating the draggable element
|
|
435
435
|
draggedEl = createDraggedElementFrom(originalDragTarget, centreDraggedOnCursor && currentMousePosition);
|
|
436
|
-
|
|
437
|
-
|
|
436
|
+
originDropZoneRoot.appendChild(draggedEl);
|
|
438
437
|
// We will keep the original dom node in the dom because touch events keep firing on it, we want to re-add it after the framework removes it
|
|
439
438
|
function keepOriginalElementInDom() {
|
|
440
|
-
if (!
|
|
441
|
-
|
|
442
|
-
// to prevent the outline from disappearing
|
|
443
|
-
draggedEl.focus();
|
|
444
|
-
watchDraggedElement();
|
|
445
|
-
hideElement(originalDragTarget);
|
|
439
|
+
if (!originalDragTarget.parentElement) {
|
|
440
|
+
originalDragTarget.setAttribute(ORIGINAL_DRAGGED_ITEM_MARKER_ATTRIBUTE, true);
|
|
446
441
|
originDropZoneRoot.appendChild(originalDragTarget);
|
|
442
|
+
hideElement(originalDragTarget);
|
|
447
443
|
// after the removal of the original element we can give the shadow element the original item id so that the host zone can find it and render it correctly if it does lookups by id
|
|
448
444
|
shadowElData[ITEM_ID_KEY] = draggedElData[ITEM_ID_KEY];
|
|
445
|
+
// to prevent the outline from disappearing
|
|
446
|
+
draggedEl.focus();
|
|
447
|
+
watchDraggedElement();
|
|
449
448
|
} else {
|
|
450
449
|
window.requestAnimationFrame(keepOriginalElementInDom);
|
|
451
450
|
}
|