Skip to content

Commit

Permalink
v2.0.3
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelmalonenz committed Mar 1, 2019
1 parent 7aca9a3 commit b4e65ec
Show file tree
Hide file tree
Showing 5 changed files with 49 additions and 9 deletions.
14 changes: 12 additions & 2 deletions dist/amd/dragula-and-drop.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ define(['exports', 'aurelia-templating', 'aurelia-binding', 'aurelia-dependency-
isContainer: this._isContainer.bind(this),
moves: this._moves.bind(this),
accepts: this._accepts.bind(this),
invalid: this._invalid.bind(this)
invalid: this._invalid.bind(this),
copy: this._copy.bind(this)
};

this.options = Object.assign(aureliaOptions, boundOptions);
Expand Down Expand Up @@ -110,10 +111,19 @@ define(['exports', 'aurelia-templating', 'aurelia-binding', 'aurelia-dependency-
}
};

DragulaAndDrop.prototype._copy = function _copy(item, container) {
if (typeof this.copy === 'function') {
return this.copy({ item: item, container: container });
}
if (typeof this.globalOptions.copy === 'function') {
return this.globalOptions.copy({ item: item, container: container });
}
return this._convertToBooleanIfRequired(this._getOption('copy'));
};

DragulaAndDrop.prototype._setupOptions = function _setupOptions() {
var result = {
containers: this._getOption('containers'),
copy: this._convertToBooleanIfRequired(this._getOption('copy')),
copySortSource: this._convertToBooleanIfRequired(this._getOption('copySortSource')),
revertOnSpill: this._convertToBooleanIfRequired(this._getOption('revertOnSpill')),
removeOnSpill: this._convertToBooleanIfRequired(this._getOption('removeOnSpill')),
Expand Down
14 changes: 12 additions & 2 deletions dist/aurelia-dragula.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,8 @@ export class DragulaAndDrop {
isContainer: this._isContainer.bind(this),
moves: this._moves.bind(this),
accepts: this._accepts.bind(this),
invalid: this._invalid.bind(this)
invalid: this._invalid.bind(this),
copy: this._copy.bind(this)
};

this.options = Object.assign(aureliaOptions, boundOptions);
Expand Down Expand Up @@ -166,10 +167,19 @@ export class DragulaAndDrop {
}
}

_copy(item, container) {
if (typeof this.copy === 'function') {
return this.copy({ item, container });
}
if (typeof this.globalOptions.copy === 'function') {
return this.globalOptions.copy({ item, container })
}
return this._convertToBooleanIfRequired(this._getOption('copy'))
}

_setupOptions() {
let result = {
containers: this._getOption('containers'),
copy: this._convertToBooleanIfRequired(this._getOption('copy')),
copySortSource: this._convertToBooleanIfRequired(this._getOption('copySortSource')),
revertOnSpill: this._convertToBooleanIfRequired(this._getOption('revertOnSpill')),
removeOnSpill: this._convertToBooleanIfRequired(this._getOption('removeOnSpill')),
Expand Down
14 changes: 12 additions & 2 deletions dist/commonjs/dragula-and-drop.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ var DragulaAndDrop = exports.DragulaAndDrop = (_dec = (0, _aureliaTemplating.bin
isContainer: this._isContainer.bind(this),
moves: this._moves.bind(this),
accepts: this._accepts.bind(this),
invalid: this._invalid.bind(this)
invalid: this._invalid.bind(this),
copy: this._copy.bind(this)
};

this.options = Object.assign(aureliaOptions, boundOptions);
Expand Down Expand Up @@ -117,10 +118,19 @@ var DragulaAndDrop = exports.DragulaAndDrop = (_dec = (0, _aureliaTemplating.bin
}
};

DragulaAndDrop.prototype._copy = function _copy(item, container) {
if (typeof this.copy === 'function') {
return this.copy({ item: item, container: container });
}
if (typeof this.globalOptions.copy === 'function') {
return this.globalOptions.copy({ item: item, container: container });
}
return this._convertToBooleanIfRequired(this._getOption('copy'));
};

DragulaAndDrop.prototype._setupOptions = function _setupOptions() {
var result = {
containers: this._getOption('containers'),
copy: this._convertToBooleanIfRequired(this._getOption('copy')),
copySortSource: this._convertToBooleanIfRequired(this._getOption('copySortSource')),
revertOnSpill: this._convertToBooleanIfRequired(this._getOption('revertOnSpill')),
removeOnSpill: this._convertToBooleanIfRequired(this._getOption('removeOnSpill')),
Expand Down
14 changes: 12 additions & 2 deletions dist/system/dragula-and-drop.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@ System.register(['aurelia-templating', 'aurelia-binding', 'aurelia-dependency-in
isContainer: this._isContainer.bind(this),
moves: this._moves.bind(this),
accepts: this._accepts.bind(this),
invalid: this._invalid.bind(this)
invalid: this._invalid.bind(this),
copy: this._copy.bind(this)
};

this.options = Object.assign(aureliaOptions, boundOptions);
Expand Down Expand Up @@ -125,10 +126,19 @@ System.register(['aurelia-templating', 'aurelia-binding', 'aurelia-dependency-in
}
};

DragulaAndDrop.prototype._copy = function _copy(item, container) {
if (typeof this.copy === 'function') {
return this.copy({ item: item, container: container });
}
if (typeof this.globalOptions.copy === 'function') {
return this.globalOptions.copy({ item: item, container: container });
}
return this._convertToBooleanIfRequired(this._getOption('copy'));
};

DragulaAndDrop.prototype._setupOptions = function _setupOptions() {
var result = {
containers: this._getOption('containers'),
copy: this._convertToBooleanIfRequired(this._getOption('copy')),
copySortSource: this._convertToBooleanIfRequired(this._getOption('copySortSource')),
revertOnSpill: this._convertToBooleanIfRequired(this._getOption('revertOnSpill')),
removeOnSpill: this._convertToBooleanIfRequired(this._getOption('removeOnSpill')),
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "aurelia-dragula",
"version": "2.0.2",
"version": "2.0.3",
"description": "An aurelia compatible version of Dragula",
"keywords": [
"aurelia",
Expand Down

0 comments on commit b4e65ec

Please sign in to comment.