angular-sortablejs
Advanced tools
Comparing version 1.0.0-1 to 1.0.0-2
{ | ||
"name": "angular-sortablejs", | ||
"version": "1.0.0-1", | ||
"version": "1.0.0-2", | ||
"description": "SortableJS for Angular 2+", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -14,3 +14,10 @@ "use strict"; | ||
var index_1 = require('../index'); | ||
// Sortable | ||
var Sortable = require('sortablejs'); | ||
// original library calls the events in unnatural order | ||
// first the item is added, then removed from the previous array | ||
// this is a temporary event to work this around | ||
// as long as only one sortable takes place at a certain time | ||
// this is enough to have a single `global` event | ||
var onremove; | ||
var SortablejsDirective = (function () { | ||
@@ -43,9 +50,5 @@ function SortablejsDirective(element) { | ||
if (this._items) { | ||
// original library calls the events in unnatural order | ||
// first the item is added, then removed from the previous array | ||
// this is a temporary event to work this around | ||
var onremove_1; | ||
return { | ||
onAdd: function (event) { | ||
onremove_1 = function (item) { | ||
onremove = function (item) { | ||
if (_this._items instanceof forms_1.FormArray) { | ||
@@ -69,4 +72,4 @@ _this._items.insert(event.newIndex, item); | ||
} | ||
onremove_1(item); | ||
onremove_1 = null; | ||
onremove(item); | ||
onremove = null; | ||
_this.proxyEvent('onRemove'); | ||
@@ -73,0 +76,0 @@ }, |
Sorry, the diff of this file is not supported yet
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
18285
291