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.5.2 to 0.5.3

2

package.json

@@ -29,3 +29,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.5.2",
"version": "0.5.3",
"repository": {

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

@@ -19,2 +19,3 @@ const TRANSITION_DURATION_SECONDS = 0.2;

const draggedEl = originalElement.cloneNode(true);
copyStylesFromTo(originalElement, draggedEl);
draggedEl.id = `svelte-dnd-action-dragged-el`;

@@ -72,2 +73,12 @@ draggedEl.name = `svelte-dnd-action-dragged-el`;

/// other properties
copyStylesFromTo(copyFromEl, draggedEl);
transformDraggedElement();
}
/**
*
* @param {HTMLElement} copyFromEl
* @param {HTMLElement} copyToEl
*/
function copyStylesFromTo(copyFromEl, copyToEl) {
const computedStyle = window.getComputedStyle(copyFromEl);

@@ -78,6 +89,4 @@ Array.from(computedStyle)

.forEach(s =>
draggedEl.style.setProperty(s, computedStyle.getPropertyValue(s), computedStyle.getPropertyPriority(s))
copyToEl.style.setProperty(s, computedStyle.getPropertyValue(s), computedStyle.getPropertyPriority(s))
);
transformDraggedElement();
}

@@ -84,0 +93,0 @@

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