drag-drop-tool
Advanced tools
Comparing version 1.0.2 to 1.0.3
{ | ||
"name": "drag-drop-tool", | ||
"version": "1.0.2", | ||
"version": "1.0.3", | ||
"description": "Drag and drop tool", | ||
@@ -5,0 +5,0 @@ "main": "src/index.js", |
# Drag Drop Tool | ||
# Draggable Elements Demo | ||
To demonstrate the usage of the `drag-container` and `drag-box` elements, follow these steps: | ||
1. Create an HTML file (e.g., `index.html`) and a CSS file (e.g., `styles.css`) in your project. | ||
**index.html**: | ||
2. include | ||
```html | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
<title>Draggable Elements Demo</title> | ||
<link rel="stylesheet" href="styles.css" /> | ||
</head> | ||
<body> | ||
<drag-container> | ||
<drag-box id="box1">Box 1</drag-box> | ||
<drag-box id="box2">Box 2</drag-box> | ||
<drag-box id="box3">Box 3</drag-box> | ||
</drag-container> | ||
</body> | ||
</html> | ||
``` |
@@ -144,6 +144,2 @@ class DragContainerElement extends HTMLElement { | ||
const styles = window.getComputedStyle(this); | ||
const border = styles.getPropertyValue("border"); | ||
const bgColor = styles.getPropertyValue("background-color"); | ||
const width = styles.getPropertyValue("width"); | ||
const height = styles.getPropertyValue("height"); | ||
@@ -210,2 +206,3 @@ this.cloneEl = this.cloneNode(true); | ||
initialiseStyle() { | ||
this.style.userSelect = "none"; | ||
this.style.boxSizing = "border-box"; | ||
@@ -212,0 +209,0 @@ } |
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
8586
31
204