svelte-dnd-action
Advanced tools
Comparing version 0.2.10 to 0.2.11
@@ -555,2 +555,10 @@ (function (global, factory) { | ||
/** | ||
* @param {Object} object | ||
* @return {string} | ||
*/ | ||
function toString(object) { | ||
return JSON.stringify(object, null, 2); | ||
} | ||
const ITEM_ID_KEY = "id"; | ||
@@ -639,3 +647,3 @@ const DEFAULT_DROP_ZONE_TYPE = '--any--'; | ||
items = items.filter(i => i.id !== shadowElData.id); | ||
console.debug(`dragged entered items ${JSON.stringify(items)}`); | ||
console.debug(`dragged entered items ${toString(items)}`); | ||
const {index, isProximityBased} = e.detail.indexObj; | ||
@@ -778,3 +786,3 @@ shadowElIdx = (isProximityBased && index === e.currentTarget.children.length - 1)? index + 1 : index; | ||
}; | ||
console.debug("dndzone good to go", {node, options, config}); | ||
console.debug(`dndzone good to go options: ${toString(options)}, config: ${toString(config)}`, {node}); | ||
let elToIdx = new Map(); | ||
@@ -824,3 +832,3 @@ | ||
function handleDragStart() { | ||
console.debug('drag start', originalDragTarget, {config}); | ||
console.debug(`drag start config: ${toString(config)}`, originalDragTarget); | ||
isWorkingOnPreviousDrag = true; | ||
@@ -889,3 +897,3 @@ | ||
config.items = items; | ||
config.items = [...items]; | ||
@@ -928,3 +936,3 @@ config.dragDisabled = dragDisabled; | ||
update: (newOptions) => { | ||
console.debug("dndzone will update", newOptions); | ||
console.debug(`dndzone will update newOptions: ${toString(newOptions)}`); | ||
configure(newOptions); | ||
@@ -931,0 +939,0 @@ }, |
@@ -33,3 +33,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.2.10", | ||
"version": "0.2.11", | ||
"dependencies": { | ||
@@ -36,0 +36,0 @@ "acorn": "^7.1.1", |
@@ -14,2 +14,4 @@ import { observe, unobserve } from './helpers/observer'; | ||
import { DRAGGED_ENTERED_EVENT_NAME, DRAGGED_LEFT_EVENT_NAME, DRAGGED_LEFT_DOCUMENT_EVENT_NAME, DRAGGED_OVER_INDEX_EVENT_NAME, dispatchConsiderEvent, dispatchFinalizeEvent } from './helpers/dispatcher'; | ||
import { toString} from "./helpers/util"; | ||
const ITEM_ID_KEY = "id"; | ||
@@ -98,3 +100,3 @@ const DEFAULT_DROP_ZONE_TYPE = '--any--'; | ||
items = items.filter(i => i.id !== shadowElData.id) | ||
console.debug(`dragged entered items ${JSON.stringify(items)}`); | ||
console.debug(`dragged entered items ${toString(items)}`); | ||
const {index, isProximityBased} = e.detail.indexObj; | ||
@@ -237,3 +239,3 @@ shadowElIdx = (isProximityBased && index === e.currentTarget.children.length - 1)? index + 1 : index; | ||
}; | ||
console.debug("dndzone good to go", {node, options, config}); | ||
console.debug(`dndzone good to go options: ${toString(options)}, config: ${toString(config)}`, {node}); | ||
let elToIdx = new Map(); | ||
@@ -283,3 +285,3 @@ | ||
function handleDragStart() { | ||
console.debug('drag start', originalDragTarget, {config}); | ||
console.debug(`drag start config: ${toString(config)}`, originalDragTarget); | ||
isWorkingOnPreviousDrag = true; | ||
@@ -348,3 +350,3 @@ | ||
config.items = items; | ||
config.items = [...items]; | ||
@@ -387,3 +389,3 @@ config.dragDisabled = dragDisabled; | ||
update: (newOptions) => { | ||
console.debug("dndzone will update", newOptions); | ||
console.debug(`dndzone will update newOptions: ${toString(newOptions)}`); | ||
configure(newOptions); | ||
@@ -390,0 +392,0 @@ }, |
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
126686
15
2640