svelte-dnd-action
Advanced tools
Comparing version 0.9.2 to 0.9.3
@@ -78,2 +78,3 @@ /** | ||
export declare const SHADOW_PLACEHOLDER_ITEM_ID: "id:dnd-shadow-placeholder-0000"; | ||
export declare const DRAGGED_ELEMENT_ID: "dnd-action-dragged-el"; | ||
@@ -80,0 +81,0 @@ /** |
@@ -43,3 +43,3 @@ { | ||
"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 *", | ||
"version": "0.9.2", | ||
"version": "0.9.3", | ||
"repository": { | ||
@@ -46,0 +46,0 @@ "type": "git", |
@@ -139,2 +139,3 @@ # SVELTE DND ACTION [![Known Vulnerabilities](https://snyk.io/test/github/isaacHagoel/svelte-dnd-action/badge.svg?targetFile=package.json)](https://snyk.io/test/github/isaacHagoel/svelte-dnd-action?targetFile=package.json) | ||
For use cases that have recursively nested zones (ex: [crazy nesting](https://svelte.dev/repl/fe8c9eca04f9417a94a8b6041df77139?version=3.35.0)), you might want to import `SHADOW_PLACEHOLDER_ITEM_ID` in order to filter the placeholder out when passing the items in to the nested component. | ||
If you need to manipulate the dragged element either dynamically (and don't want to use the `transformDraggedElement` option), or statically targeting it or its children with CSS, you can import and use `DRAGGED_ELEMENT_ID`; | ||
@@ -141,0 +142,0 @@ ### Accessibility (beta) |
@@ -24,2 +24,3 @@ import {DRAGGED_ENTERED_EVENT_NAME, DRAGGED_LEFT_EVENT_NAME, DRAGGED_OVER_INDEX_EVENT_NAME} from "./helpers/dispatcher"; | ||
export const SHADOW_PLACEHOLDER_ITEM_ID = "id:dnd-shadow-placeholder-0000"; | ||
export const DRAGGED_ELEMENT_ID = "dnd-action-dragged-el"; | ||
@@ -26,0 +27,0 @@ export let ITEM_ID_KEY = "id"; |
@@ -1,2 +0,2 @@ | ||
import {SHADOW_ELEMENT_ATTRIBUTE_NAME} from "../constants"; | ||
import {SHADOW_ELEMENT_ATTRIBUTE_NAME, DRAGGED_ELEMENT_ID} from "../constants"; | ||
import {findCenter} from "./intersection"; | ||
@@ -24,3 +24,3 @@ | ||
copyStylesFromTo(originalElement, draggedEl); | ||
draggedEl.id = `dnd-action-dragged-el`; | ||
draggedEl.id = DRAGGED_ELEMENT_ID; | ||
draggedEl.style.position = "fixed"; | ||
@@ -27,0 +27,0 @@ let elTopPx = rect.top; |
@@ -8,4 +8,5 @@ export {dndzone} from "./action.js"; | ||
SHADOW_PLACEHOLDER_ITEM_ID, | ||
DRAGGED_ELEMENT_ID, | ||
overrideItemIdKeyNameBeforeInitialisingDndZones, | ||
setDebugMode | ||
} from "./constants"; |
Sorry, the diff of this file is too big to display
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
265892
6211
285