Socket
Socket
Sign inDemoInstall

drag-drop-tool

Package Overview
Dependencies
0
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.0.1 to 1.0.2

2

package.json
{
"name": "drag-drop-tool",
"version": "1.0.1",
"version": "1.0.2",
"description": "Drag and drop tool",

@@ -5,0 +5,0 @@ "main": "src/index.js",

@@ -1,1 +0,1 @@

# DragDropReact
# Drag Drop Tool

@@ -151,4 +151,12 @@ class DragContainerElement extends HTMLElement {

this.cloneEl.style.backgroundColor = bgColor;
this.cloneEl.style.border = border;
for (let i = 0; i < styles.length; i++) {
const styleName = styles[i];
const styleValue = styles.getPropertyValue(styleName);
const stylesToIgnore = ["position", "pointerEvents", "left", "top"];
if (!stylesToIgnore.includes(styleName)) {
this.cloneEl.style.setProperty(styleName, styleValue);
}
}
this.cloneEl.style.position = "absolute";

@@ -158,4 +166,3 @@ this.cloneEl.style.pointerEvents = "none";

this.cloneEl.style.top = top + "px";
this.cloneEl.style.width = width;
this.cloneEl.style.height = height;
const body = document.querySelector("body");

@@ -166,3 +173,3 @@ body.appendChild(this.cloneEl);

this.handleDown = (e) => {
if (e.button === 0 || e.touches) {
if ((e.button === 0 || e.touches) && !this.selected) {
const { left, top } = this.getBoundingClientRect();

@@ -169,0 +176,0 @@ if (e.touches) {

SocketSocket SOC 2 Logo

Product

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

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc