From 35efb43d4a0c1cb9aefcd45b78bdef9847ffcf53 Mon Sep 17 00:00:00 2001 From: Michael Malone Date: Wed, 6 Sep 2017 20:32:29 +1200 Subject: [PATCH] v1.5.0 --- dist/amd/dragula-and-drop.js | 6 +++--- dist/aurelia-dragula.js | 6 +++--- dist/commonjs/dragula-and-drop.js | 6 +++--- dist/es2015/dragula-and-drop.js | 6 +++--- dist/system/dragula-and-drop.js | 6 +++--- dist/temp/aurelia-dragula.js | 6 +++--- package.json | 2 +- 7 files changed, 19 insertions(+), 19 deletions(-) diff --git a/dist/amd/dragula-and-drop.js b/dist/amd/dragula-and-drop.js index c1e781a..e30dad2 100644 --- a/dist/amd/dragula-and-drop.js +++ b/dist/amd/dragula-and-drop.js @@ -34,8 +34,8 @@ define(['exports', 'aurelia-templating', 'aurelia-binding', 'aurelia-dependency- invalid: this._invalid.bind(this) }; - var options = Object.assign(aureliaOptions, boundOptions); - this.dragula = new _dragula.Dragula(options); + this.options = Object.assign(aureliaOptions, boundOptions); + this.dragula = new _dragula.Dragula(this.options); this.dragula.on('drop', this._dropFunction.bind(this)); @@ -69,7 +69,7 @@ define(['exports', 'aurelia-templating', 'aurelia-binding', 'aurelia-dependency- }; DragulaAndDrop.prototype._dropFunction = function _dropFunction(item, target, source, sibling, itemVM, siblingVM) { - this.dragula.cancel(); + this.dragula.cancel(this.options.revertOnSpill, true); if (typeof this.dropFn === 'function') this.dropFn({ item: item, target: target, source: source, sibling: sibling, itemVM: itemVM, siblingVM: siblingVM }); }; diff --git a/dist/aurelia-dragula.js b/dist/aurelia-dragula.js index bab6b67..2476a38 100644 --- a/dist/aurelia-dragula.js +++ b/dist/aurelia-dragula.js @@ -81,8 +81,8 @@ export class DragulaAndDrop { invalid: this._invalid.bind(this) }; - let options = Object.assign(aureliaOptions, boundOptions); - this.dragula = new Dragula(options); + this.options = Object.assign(aureliaOptions, boundOptions); + this.dragula = new Dragula(this.options); this.dragula.on('drop', this._dropFunction.bind(this)); @@ -122,7 +122,7 @@ export class DragulaAndDrop { } _dropFunction(item, target, source, sibling, itemVM, siblingVM) { - this.dragula.cancel(); + this.dragula.cancel(this.options.revertOnSpill, true); if (typeof this.dropFn === 'function') this.dropFn({ item, target, source, sibling, itemVM, siblingVM }); } diff --git a/dist/commonjs/dragula-and-drop.js b/dist/commonjs/dragula-and-drop.js index 4d7d204..8740f4a 100644 --- a/dist/commonjs/dragula-and-drop.js +++ b/dist/commonjs/dragula-and-drop.js @@ -41,8 +41,8 @@ var DragulaAndDrop = exports.DragulaAndDrop = (_dec = (0, _aureliaTemplating.bin invalid: this._invalid.bind(this) }; - var options = Object.assign(aureliaOptions, boundOptions); - this.dragula = new _dragula.Dragula(options); + this.options = Object.assign(aureliaOptions, boundOptions); + this.dragula = new _dragula.Dragula(this.options); this.dragula.on('drop', this._dropFunction.bind(this)); @@ -76,7 +76,7 @@ var DragulaAndDrop = exports.DragulaAndDrop = (_dec = (0, _aureliaTemplating.bin }; DragulaAndDrop.prototype._dropFunction = function _dropFunction(item, target, source, sibling, itemVM, siblingVM) { - this.dragula.cancel(); + this.dragula.cancel(this.options.revertOnSpill, true); if (typeof this.dropFn === 'function') this.dropFn({ item: item, target: target, source: source, sibling: sibling, itemVM: itemVM, siblingVM: siblingVM }); }; diff --git a/dist/es2015/dragula-and-drop.js b/dist/es2015/dragula-and-drop.js index eb63aea..1c8a8b3 100644 --- a/dist/es2015/dragula-and-drop.js +++ b/dist/es2015/dragula-and-drop.js @@ -25,8 +25,8 @@ export let DragulaAndDrop = (_dec = bindable({ name: 'moves', defaultBindingMode invalid: this._invalid.bind(this) }; - let options = Object.assign(aureliaOptions, boundOptions); - this.dragula = new Dragula(options); + this.options = Object.assign(aureliaOptions, boundOptions); + this.dragula = new Dragula(this.options); this.dragula.on('drop', this._dropFunction.bind(this)); @@ -60,7 +60,7 @@ export let DragulaAndDrop = (_dec = bindable({ name: 'moves', defaultBindingMode } _dropFunction(item, target, source, sibling, itemVM, siblingVM) { - this.dragula.cancel(); + this.dragula.cancel(this.options.revertOnSpill, true); if (typeof this.dropFn === 'function') this.dropFn({ item, target, source, sibling, itemVM, siblingVM }); } diff --git a/dist/system/dragula-and-drop.js b/dist/system/dragula-and-drop.js index 2808902..b75f64c 100644 --- a/dist/system/dragula-and-drop.js +++ b/dist/system/dragula-and-drop.js @@ -49,8 +49,8 @@ System.register(['aurelia-templating', 'aurelia-binding', 'aurelia-dependency-in invalid: this._invalid.bind(this) }; - var options = Object.assign(aureliaOptions, boundOptions); - this.dragula = new Dragula(options); + this.options = Object.assign(aureliaOptions, boundOptions); + this.dragula = new Dragula(this.options); this.dragula.on('drop', this._dropFunction.bind(this)); @@ -84,7 +84,7 @@ System.register(['aurelia-templating', 'aurelia-binding', 'aurelia-dependency-in }; DragulaAndDrop.prototype._dropFunction = function _dropFunction(item, target, source, sibling, itemVM, siblingVM) { - this.dragula.cancel(); + this.dragula.cancel(this.options.revertOnSpill, true); if (typeof this.dropFn === 'function') this.dropFn({ item: item, target: target, source: source, sibling: sibling, itemVM: itemVM, siblingVM: siblingVM }); }; diff --git a/dist/temp/aurelia-dragula.js b/dist/temp/aurelia-dragula.js index 2408fb1..fb0b508 100644 --- a/dist/temp/aurelia-dragula.js +++ b/dist/temp/aurelia-dragula.js @@ -87,8 +87,8 @@ var DragulaAndDrop = exports.DragulaAndDrop = (_dec = (0, _aureliaTemplating.bin invalid: this._invalid.bind(this) }; - var options = Object.assign(aureliaOptions, boundOptions); - this.dragula = new Dragula(options); + this.options = Object.assign(aureliaOptions, boundOptions); + this.dragula = new Dragula(this.options); this.dragula.on('drop', this._dropFunction.bind(this)); @@ -122,7 +122,7 @@ var DragulaAndDrop = exports.DragulaAndDrop = (_dec = (0, _aureliaTemplating.bin }; DragulaAndDrop.prototype._dropFunction = function _dropFunction(item, target, source, sibling, itemVM, siblingVM) { - this.dragula.cancel(); + this.dragula.cancel(this.options.revertOnSpill, true); if (typeof this.dropFn === 'function') this.dropFn({ item: item, target: target, source: source, sibling: sibling, itemVM: itemVM, siblingVM: siblingVM }); }; diff --git a/package.json b/package.json index fa67b2d..bf36370 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "aurelia-dragula", - "version": "1.4.4", + "version": "1.5.0", "description": "An aurelia compatible version of Dragula", "keywords": [ "aurelia",