Skip to content

Commit 279a7e7

Browse files
Pre-release commit
1 parent 37b95e8 commit 279a7e7

File tree

2 files changed

+9
-16
lines changed

2 files changed

+9
-16
lines changed

dist/vuedraggable.js

Lines changed: 8 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
'use strict';
22

3-
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
4-
53
(function () {
64
"use strict";
75

@@ -53,7 +51,6 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
5351

5452
var eventsListened = ['Start', 'Add', 'Remove', 'Update', 'End'];
5553
var eventsToEmit = ['Choose', 'Sort', 'Filter', 'Clone'];
56-
// const readonlyProperties = ['Move'].concat(eventsListened).concat(eventsToEmit).map(evt => 'on'+evt);
5754
var readonlyProperties = ['Move'].concat(eventsListened, eventsToEmit).map(function (evt) {
5855
return 'on' + evt;
5956
});
@@ -153,22 +150,18 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
153150
});
154151
},
155152
getUnderlyingVm: function getUnderlyingVm(htmlElt) {
156-
var currentIndex = computeVmIndex(this.getChildrenNodes(), htmlElt);
157-
var element = this.list[currentIndex];
158-
return { currentIndex: currentIndex, element: element };
153+
var index = computeVmIndex(this.getChildrenNodes(), htmlElt);
154+
var element = this.list[index];
155+
return { index: index, element: element };
159156
},
160157
getUnderlyingPotencialDraggableComponent: function getUnderlyingPotencialDraggableComponent(_ref) {
161158
var __vue__ = _ref.__vue__;
162159

163-
if (!__vue__) {
160+
if (!__vue__ || !__vue__.$options || __vue__.$options._componentTag !== "transition-group") {
164161
return __vue__;
165162
}
166163

167-
if (__vue__.$options._componentTag === "transition-group") {
168-
return __vue__.$parent;
169-
}
170-
171-
return __vue__;
164+
return __vue__.$parent;
172165
},
173166
getRelatedContextFromMoveEvent: function getRelatedContextFromMoveEvent(_ref2) {
174167
var to = _ref2.to;
@@ -211,13 +204,13 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
211204
removeNode(evt.clone);
212205
return;
213206
}
214-
var oldIndex = this.context.currentIndex;
207+
var oldIndex = this.context.index;
215208
this.list.splice(oldIndex, 1);
216209
},
217210
onDragUpdate: function onDragUpdate(evt) {
218211
removeNode(evt.item);
219212
insertNodeAt(evt.from, evt.item, evt.oldIndex);
220-
var oldIndexVM = this.context.currentIndex;
213+
var oldIndexVM = this.context.index;
221214
var newIndexVM = this.visibleIndexes[evt.newIndex];
222215
updatePosition(this.list, oldIndexVM, newIndexVM);
223216
},
@@ -240,7 +233,7 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
240233
return draggableComponent;
241234
}
242235

243-
if ((typeof exports === 'undefined' ? 'undefined' : _typeof(exports)) == "object") {
236+
if (typeof exports == "object") {
244237
var Sortable = require("sortablejs");
245238
module.exports = buildDraggable(Sortable);
246239
} else if (typeof define == "function" && define.amd) {

dist/vuedraggable.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)