draggable-vue-directive
Advanced tools
Comparing version 1.0.2 to 1.0.3
@@ -16,3 +16,4 @@ export declare type HandleType = any | HTMLElement; | ||
export declare const Draggable: { | ||
bind(el: HTMLElement, binding: DraggableBindings): void; | ||
update(el: HTMLElement, binding: DraggableBindings): void; | ||
}; |
@@ -20,2 +20,5 @@ "use strict"; | ||
exports.Draggable = { | ||
bind: function (el, binding) { | ||
exports.Draggable.update(el, binding); | ||
}, | ||
update: function (el, binding) { | ||
@@ -92,5 +95,6 @@ if (binding.value && binding.value.stopDragging) { | ||
if (!handler.getAttribute("draggable")) { | ||
el.removeEventListener("mousedown", mouseDown); | ||
el.removeEventListener("mousedown", el["listener"]); | ||
handler.addEventListener("mousedown", mouseDown); | ||
handler.setAttribute("draggable", "true"); | ||
el["listener"] = mouseDown; | ||
setState(getInitState()); | ||
@@ -97,0 +101,0 @@ onPositionChanged(); |
{ | ||
"name": "draggable-vue-directive", | ||
"version": "1.0.2", | ||
"version": "1.0.3", | ||
"description": "A simple directive to handle drag and drop of any Vue component", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
10871
125