svelte-dnd-action
Advanced tools
Comparing version 0.1.3 to 0.1.4
@@ -644,2 +644,6 @@ (function (global, factory) { | ||
dispatchFinalizeEvent(shadowElDropZone, items); | ||
if (shadowElDropZone !== originDropZone) { | ||
// letting the origin drop zone know the element was permanently taken away | ||
dispatchFinalizeEvent(originDropZone, dzToConfig.get(originDropZone).items); | ||
} | ||
shadowElDropZone.children[shadowElIdx].style.visibility = ''; | ||
@@ -646,0 +650,0 @@ cleanupPostDrop(); |
@@ -9,3 +9,3 @@ { | ||
"prepublishOnly": "npm run build", | ||
"test": "cypress open" | ||
"test": "cypress run" | ||
}, | ||
@@ -34,3 +34,3 @@ "devDependencies": { | ||
"description": "*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 *", | ||
"version": "0.1.3", | ||
"version": "0.1.4", | ||
"dependencies": { | ||
@@ -37,0 +37,0 @@ "acorn": "^7.1.1", |
@@ -95,3 +95,3 @@ # SVELTE DND ACTION | ||
- `consider` - dispatched whenever the dragged element needs to make room for itself in a new position in the items list and when it leaves. The host (your component) is expected to update the items list (you can keep a copy of the original list if you need to) | ||
- `finalize` - dispatched when the dragged element is dropped into position. The expectation is the same - update the list of items. | ||
- `finalize` - dispatched on the target and origin dnd-zones when the dragged element is dropped into position. The expectation is the same - update the list of items. | ||
In both cases the payload (within e.detail) is the same: an object with a single attribute: `items`, that contains the updated items list. | ||
@@ -98,0 +98,0 @@ You have to listen for both events and update the list of items in order for this library to work correctly. |
@@ -132,2 +132,6 @@ import { observe, unobserve } from './helpers/observer'; | ||
dispatchFinalizeEvent(shadowElDropZone, items); | ||
if (shadowElDropZone !== originDropZone) { | ||
// letting the origin drop zone know the element was permanently taken away | ||
dispatchFinalizeEvent(originDropZone, dzToConfig.get(originDropZone).items); | ||
} | ||
shadowElDropZone.children[shadowElIdx].style.visibility = ''; | ||
@@ -134,0 +138,0 @@ cleanupPostDrop(); |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
109565
2335