Skip to content

Commit b7f600a

Browse files
merge
2 parents 87e1117 + b121040 commit b7f600a

File tree

4 files changed

+19
-12
lines changed

4 files changed

+19
-12
lines changed

dist/vuedraggable.js

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

3+
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; };
4+
35
function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } }
46

57
(function () {
@@ -104,7 +106,7 @@ function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr
104106
optionsAdded['on' + elt] = emit.bind(_this2, elt);
105107
});
106108

107-
var options = Object.assign({}, this.options, optionsAdded, { onMove: function onMove(evt) {
109+
var options = _extends({}, this.options, optionsAdded, { onMove: function onMove(evt) {
108110
return _this2.onDragMove(evt);
109111
} });
110112
this._sortable = new Sortable(this.rootContainer, options);
@@ -175,8 +177,8 @@ function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr
175177
this.list.splice(newIndex, 0, this.list.splice(oldIndex, 1)[0]);
176178
},
177179
getRelatedContextFromMoveEvent: function getRelatedContextFromMoveEvent(_ref2) {
178-
var to = _ref2.to;
179-
var related = _ref2.related;
180+
var to = _ref2.to,
181+
related = _ref2.related;
180182

181183
var component = this.getUnderlyingPotencialDraggableComponent(to);
182184
if (!component) {
@@ -186,7 +188,7 @@ function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr
186188
var context = { list: list, component: component };
187189
if (to !== related && list && component.getUnderlyingVm) {
188190
var destination = component.getUnderlyingVm(related);
189-
return Object.assign(destination, context);
191+
return _extends(destination, context);
190192
}
191193

192194
return context;
@@ -253,8 +255,8 @@ function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr
253255
var relatedContext = this.getRelatedContextFromMoveEvent(evt);
254256
var draggedContext = this.context;
255257
var futureIndex = this.computeFutureIndex(relatedContext, evt);
256-
Object.assign(draggedContext, { futureIndex: futureIndex });
257-
Object.assign(evt, { relatedContext: relatedContext, draggedContext: draggedContext });
258+
_extends(draggedContext, { futureIndex: futureIndex });
259+
_extends(evt, { relatedContext: relatedContext, draggedContext: draggedContext });
258260
return onMove(evt);
259261
},
260262
onDragEnd: function onDragEnd(evt) {

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.

gulpfile.js

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ const babel = require('gulp-babel');
1010
gulp.task('scripts', function () {
1111
return gulp.src('src/**/*.js')
1212
.pipe(babel({
13-
presets: ['es2015']
13+
presets: ['es2015'],
14+
plugins: ["transform-object-assign"]
1415
}))
1516
.pipe($.jshint())
1617
.pipe($.jshint.reporter(require('jshint-stylish')))
@@ -25,7 +26,8 @@ gulp.task('buildjs', ['scripts'], function () {
2526

2627
return gulp.src('src/**/*.js')
2728
.pipe(babel({
28-
presets: ['es2015']
29+
presets: ['es2015'],
30+
plugins: ["transform-object-assign"]
2931
}))
3032
.pipe(gulp.dest('dist'))
3133
.pipe($.size());
@@ -36,7 +38,8 @@ gulp.task('js', ['buildjs'], function () {
3638

3739
return gulp.src('src/**/*.js')
3840
.pipe(babel({
39-
presets: ['es2015']
41+
presets: ['es2015'],
42+
plugins: ["transform-object-assign"]
4043
}))
4144
.pipe($.uglify())
4245
.pipe(rename({
@@ -91,7 +94,8 @@ gulp.task('main-bower-files', function() {
9194
gulp.task('copy-js', function() {
9295
return gulp.src('src/**/*.js')
9396
.pipe(babel({
94-
presets: ['es2015']
97+
presets: ['es2015'],
98+
plugins: ["transform-object-assign"]
9599
}))
96100
.pipe(gulp.dest('./examples/src'));
97101
});

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "vuedraggable",
3-
"version": "2.8.1-rc0",
3+
"version": "2.8.2-rc0",
44
"description": "draggable component for vue",
55
"main": "dist/vuedraggable.js",
66
"files": [
@@ -21,6 +21,7 @@
2121
"sortablejs": "^1.5.0-rc1"
2222
},
2323
"devDependencies": {
24+
"babel-plugin-transform-object-assign": "^6.22.0",
2425
"babel-polyfill": "^6.20.0",
2526
"babel-preset-es2015": "^6.16.0",
2627
"bower": "^1.7.9",

0 commit comments

Comments
 (0)