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

svelte-dnd-action

Package Overview
Dependencies
Maintainers
1
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.20 to 0.9.21

2

package.json

@@ -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.20",
"version": "0.9.21",
"repository": {

@@ -46,0 +46,0 @@ "type": "git",

import {SHADOW_ELEMENT_ATTRIBUTE_NAME, DRAGGED_ELEMENT_ID} from "../constants";
import {findCenter} from "./intersection";
import { svelteNodeClone } from "./svelteNodeClone";
import {svelteNodeClone} from "./svelteNodeClone";

@@ -68,5 +68,5 @@ const TRANSITION_DURATION_SECONDS = 0.2;

* @param {number} currentMouseY
* @param {function} transformDraggedElement - function to transform the dragged element, does nothing by default.
*/
export function morphDraggedElementToBeLike(draggedEl, copyFromEl, currentMouseX, currentMouseY, transformDraggedElement) {
export function morphDraggedElementToBeLike(draggedEl, copyFromEl, currentMouseX, currentMouseY) {
copyStylesFromTo(copyFromEl, draggedEl);
const newRect = copyFromEl.getBoundingClientRect();

@@ -86,6 +86,2 @@ const draggedElRect = draggedEl.getBoundingClientRect();

}
/// other properties
copyStylesFromTo(copyFromEl, draggedEl);
transformDraggedElement();
}

@@ -92,0 +88,0 @@

@@ -300,3 +300,3 @@ import {

dz.remove();
})
});
scheduledForRemovalAfterDrop = [];

@@ -518,6 +518,5 @@ }

if (idx === shadowElIdx) {
config.transformDraggedElement(draggedEl, draggedElData, idx);
if (!morphDisabled) {
morphDraggedElementToBeLike(draggedEl, draggableEl, currentMousePosition.x, currentMousePosition.y, () =>
config.transformDraggedElement(draggedEl, draggedElData, idx)
);
morphDraggedElementToBeLike(draggedEl, draggableEl, currentMousePosition.x, currentMousePosition.y);
}

@@ -559,3 +558,3 @@ decorateShadowEl(draggableEl);

} else {
destroyDz();
destroyDz();
}

@@ -562,0 +561,0 @@ }

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