@marsio/vue-draggable 1.0.7 → 1.0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -3
- package/build/cjs/DraggableCore.js +0 -8
- package/build/web/vue-draggable.min.js +1399 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -6,7 +6,10 @@ Draggable and DraggableCore are **Vue3** components designed to make elements dr
|
|
|
6
6
|
<img src="https://user-images.githubusercontent.com/6365230/95649276-f3a02480-0b06-11eb-8504-e0614a780ba4.gif" />
|
|
7
7
|
</p>
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
[**[Demo](http://110.41.33.162:9001/) | [Changelog](/CHANGELOG.md) | [View Example](/example/example.js)**]
|
|
10
|
+
|
|
11
|
+
## ✨ Features
|
|
12
|
+
- **Compatibility**: Compatible with server-rendered apps, PC, and mobile devices.
|
|
10
13
|
- **Drag Handlers**: Offers customizable drag handlers (`startFn`, `dragFn`, `stopFn`) that allow developers to hook into drag start, during drag, and drag stop events, providing flexibility in handling these events.
|
|
11
14
|
- **Position Control**: Supports controlled (`position`) and uncontrolled (`defaultPosition`) modes for element positioning, giving developers the choice to manage the draggable element's position externally or let the component handle it internally.
|
|
12
15
|
- **Axis Constraints**: Allows dragging to be constrained along a specific axis (`axis`) with options for 'x', 'y', 'both', or 'none', enabling more precise control over the draggable behavior.
|
|
@@ -15,7 +18,7 @@ Draggable and DraggableCore are **Vue3** components designed to make elements dr
|
|
|
15
18
|
- **Grid Snapping**: Allows the draggable element to snap to a grid (`grid` prop), facilitating alignment and precise placement during dragging.
|
|
16
19
|
- **Accessibility and Interaction**: Includes props for disabling the draggable functionality (`disabled`), allowing any mouse button to initiate dragging (`allowAnyClick`), and enabling a hack to prevent text selection during drag (`enableUserSelectHack`), enhancing usability and accessibility.
|
|
17
20
|
|
|
18
|
-
## Quick Start
|
|
21
|
+
## 📦 Quick Start
|
|
19
22
|
|
|
20
23
|
To quickly start using `@marsio/vue-draggable`, follow the steps below:
|
|
21
24
|
|
|
@@ -343,7 +346,7 @@ Drag callbacks (`startFn`, `dragFn`, `stopFn`) are called with the [same argumen
|
|
|
343
346
|
|
|
344
347
|
----
|
|
345
348
|
|
|
346
|
-
###
|
|
349
|
+
### 🖥 Environment Support
|
|
347
350
|
|
|
348
351
|
| [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/edge/edge_48x48.png" alt="Edge" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>Edge | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/firefox/firefox_48x48.png" alt="Firefox" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>Firefox | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/chrome/chrome_48x48.png" alt="Chrome" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>Chrome | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/safari/safari_48x48.png" alt="Safari" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>Safari | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/opera/opera_48x48.png" alt="Opera" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>Opera |
|
|
349
352
|
| --- | --- | --- | --- | --- |
|
|
@@ -67,13 +67,6 @@ const defaultDraggableEventHandler = (e, data) => true;
|
|
|
67
67
|
exports.defaultDraggableEventHandler = defaultDraggableEventHandler;
|
|
68
68
|
let dragEventFor = eventsFor.mouse;
|
|
69
69
|
const draggableCoreDefaultProps = exports.draggableCoreDefaultProps = {
|
|
70
|
-
// allowAnyClick: VueTypes.bool.def(false),
|
|
71
|
-
// disabled: VueTypes.bool.def(false),
|
|
72
|
-
// enableUserSelectHack: VueTypes.bool.def(true),
|
|
73
|
-
// startFn: VueTypes.func.def(defaultDraggableEventHandler).def(funcVoid),
|
|
74
|
-
// dragFn: VueTypes.func.def(defaultDraggableEventHandler).def(funcVoid),
|
|
75
|
-
// stopFn: VueTypes.func.def(defaultDraggableEventHandler).def(funcVoid),
|
|
76
|
-
// scale: VueTypes.number.def(1),
|
|
77
70
|
allowAnyClick: {
|
|
78
71
|
type: Boolean,
|
|
79
72
|
default: false
|
|
@@ -110,7 +103,6 @@ const draggableCoreProps = exports.draggableCoreProps = {
|
|
|
110
103
|
},
|
|
111
104
|
offsetParent: {
|
|
112
105
|
type: Object,
|
|
113
|
-
default: () => document.body,
|
|
114
106
|
validator: value => (0, _shims.propIsNotNode)(value)
|
|
115
107
|
},
|
|
116
108
|
grid: {
|