Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

svelte-dnd-action

Package Overview
Dependencies
Maintainers
0
Versions
129
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

svelte-dnd-action - npm Package Compare versions

Comparing version 0.9.50 to 0.9.51

1

dist/index.d.ts

@@ -61,2 +61,3 @@ import type {ActionReturn} from "svelte/action";

centreDraggedOnCursor?: boolean;
dropAnimationDisabled?: boolean;
}

@@ -63,0 +64,0 @@

4

package.json
{
"name": "svelte-dnd-action",
"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 *",
"version": "0.9.50",
"version": "0.9.51",
"repository": {

@@ -50,3 +50,3 @@ "type": "git",

"prettier": "^2.1.2",
"rollup": "^1.20.0",
"rollup": "^2.79.2",
"rollup-plugin-babel": "^4.3.2",

@@ -53,0 +53,0 @@ "rollup-plugin-copy": "^3.3.0"

@@ -121,2 +121,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)

| `centreDraggedOnCursor` | Boolean | No | `false` | Setting it to true will cause elements from this dnd-zone to position their center on the cursor on drag start, effectively turning the cursor to the focal point that triggers all the dnd events (ex: entering another zone). Useful for dnd-zones with large items that can be dragged over small items. |
| `dropAnimationDisabled` | Boolean | No | `false` | Setting it to true will disable the animation of the dropped element to its final place. |

@@ -123,0 +124,0 @@ ##### Output:

@@ -23,2 +23,3 @@ import {dndzone as pointerDndZone} from "./pointerAction";

* @property {string[]} [dropTargetClasses]
* @property {boolean} [dropAnimationDisabled] - cancels the drop animation to place
* @property {function} [transformDraggedElement]

@@ -78,2 +79,3 @@ * @param {HTMLElement} node - the element to enhance

centreDraggedOnCursor,
dropAnimationDisabled,
...rest

@@ -80,0 +82,0 @@ } = options;

@@ -274,3 +274,7 @@ import {

}
animateDraggedToFinalPosition(shadowElIdx, finalizeWithinZone);
if (dzToConfig.get(shadowElDropZone).dropAnimationDisabled) {
finalizeWithinZone();
} else {
animateDraggedToFinalPosition(shadowElIdx, finalizeWithinZone);
}
}

@@ -340,3 +344,4 @@

transformDraggedElement: () => {},
centreDraggedOnCursor: false
centreDraggedOnCursor: false,
dropAnimationDisabled: false
};

@@ -473,3 +478,4 @@ printDebug(() => [`dndzone good to go options: ${toString(options)}, config: ${toString(config)}`, {node}]);

transformDraggedElement = () => {},
centreDraggedOnCursor = false
centreDraggedOnCursor = false,
dropAnimationDisabled = false
}) {

@@ -486,2 +492,3 @@ config.dropAnimationDurationMs = dropAnimationDurationMs;

config.centreDraggedOnCursor = centreDraggedOnCursor;
config.dropAnimationDisabled = dropAnimationDisabled;

@@ -488,0 +495,0 @@ // realtime update for dropTargetStyle

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc