vuedraggable
Advanced tools
Comparing version 2.10.0 to 2.11.0
'use strict'; | ||
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; | ||
@@ -80,2 +79,6 @@ | ||
}, | ||
noTransitionOnDrag: { | ||
type: Boolean, | ||
default: false | ||
}, | ||
clone: { | ||
@@ -155,9 +158,14 @@ type: Function, | ||
watch: { | ||
options: function options(newOptionValue) { | ||
for (var property in newOptionValue) { | ||
if (readonlyProperties.indexOf(property) == -1) { | ||
this._sortable.option(property, newOptionValue[property]); | ||
options: { | ||
handler: function handler(newOptionValue) { | ||
for (var property in newOptionValue) { | ||
if (readonlyProperties.indexOf(property) == -1) { | ||
this._sortable.option(property, newOptionValue[property]); | ||
} | ||
} | ||
} | ||
}, | ||
deep: true | ||
}, | ||
realList: function realList() { | ||
@@ -248,2 +256,15 @@ this.computeIndexes(); | ||
}, | ||
getComponent: function getComponent() { | ||
return this.$slots.default[0].componentInstance; | ||
}, | ||
resetTransitionData: function resetTransitionData(index) { | ||
if (!this.noTransitionOnDrag || !this.transitionMode) { | ||
return; | ||
} | ||
var nodes = this.getChildrenNodes(); | ||
nodes[index].data = null; | ||
var transitionContainer = this.getComponent(); | ||
transitionContainer.children = []; | ||
transitionContainer.kept = undefined; | ||
}, | ||
onDragStart: function onDragStart(evt) { | ||
@@ -275,2 +296,3 @@ this.context = this.getUnderlyingVm(evt.item); | ||
var removed = { element: this.context.element, oldIndex: oldIndex }; | ||
this.resetTransitionData(oldIndex); | ||
this.emitChanges({ removed: removed }); | ||
@@ -319,3 +341,3 @@ }, | ||
if (typeof exports == "object") { | ||
if (typeof exports == "object") { | ||
var Sortable = require("sortablejs"); | ||
@@ -322,0 +344,0 @@ module.exports = buildDraggable(Sortable); |
{ | ||
"name": "vuedraggable", | ||
"version": "2.10.0", | ||
"version": "2.11.0", | ||
"description": "draggable component for vue", | ||
@@ -5,0 +5,0 @@ "main": "dist/vuedraggable.js", |
@@ -205,3 +205,3 @@ <p align="center"><img width="100"src="https://raw.githubusercontent.com/SortableJS/Vue.Draggable/master/logo.png"></p> | ||
To be able to drag items on an empty draggable component, set a min-height>0 on the `draggable` component or the `transition-group` if any. | ||
To be able to drag items on an empty draggable component, set a min-height more than 0 on the `draggable` component or the `transition-group` if any and ensure the transition group has display: block; otherwise height won't work. | ||
@@ -208,0 +208,0 @@ ### Fiddle |
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
23427
315