Comparing version 1.3.0 to 2.0.1
@@ -25,2 +25,6 @@ 'use strict'; | ||
var _asap = require('asap'); | ||
var _asap2 = _interopRequireDefault(_asap); | ||
var HandlerRoles = { | ||
@@ -159,13 +163,23 @@ SOURCE: 'SOURCE', | ||
HandlerRegistry.prototype.removeSource = function removeSource(sourceId) { | ||
var _this2 = this; | ||
_invariant2['default'](this.getSource(sourceId), 'Expected an existing source.'); | ||
this.store.dispatch(_actionsRegistry.removeSource(sourceId)); | ||
delete this.handlers[sourceId]; | ||
delete this.types[sourceId]; | ||
_asap2['default'](function () { | ||
delete _this2.handlers[sourceId]; | ||
delete _this2.types[sourceId]; | ||
}); | ||
}; | ||
HandlerRegistry.prototype.removeTarget = function removeTarget(targetId) { | ||
var _this3 = this; | ||
_invariant2['default'](this.getTarget(targetId), 'Expected an existing target.'); | ||
this.store.dispatch(_actionsRegistry.removeTarget(targetId)); | ||
delete this.handlers[targetId]; | ||
delete this.types[targetId]; | ||
_asap2['default'](function () { | ||
delete _this3.handlers[targetId]; | ||
delete _this3.types[targetId]; | ||
}); | ||
}; | ||
@@ -172,0 +186,0 @@ |
{ | ||
"name": "dnd-core", | ||
"version": "1.3.0", | ||
"version": "2.0.1", | ||
"description": "Drag and drop sans the GUI", | ||
@@ -33,2 +33,3 @@ "main": "lib/index.js", | ||
"dependencies": { | ||
"asap": "^2.0.3", | ||
"invariant": "^2.0.0", | ||
@@ -35,0 +36,0 @@ "lodash": "^4.2.0", |
@@ -5,2 +5,3 @@ import invariant from 'invariant'; | ||
import { addSource, addTarget, removeSource, removeTarget } from './actions/registry'; | ||
import asap from 'asap'; | ||
@@ -139,4 +140,7 @@ const HandlerRoles = { | ||
this.store.dispatch(removeSource(sourceId)); | ||
delete this.handlers[sourceId]; | ||
delete this.types[sourceId]; | ||
asap(() => { | ||
delete this.handlers[sourceId]; | ||
delete this.types[sourceId]; | ||
}); | ||
} | ||
@@ -147,4 +151,7 @@ | ||
this.store.dispatch(removeTarget(targetId)); | ||
delete this.handlers[targetId]; | ||
delete this.types[targetId]; | ||
asap(() => { | ||
delete this.handlers[targetId]; | ||
delete this.types[targetId]; | ||
}); | ||
} | ||
@@ -151,0 +158,0 @@ |
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
64680
1697
4
+ Addedasap@^2.0.3
+ Addedasap@2.0.6(transitive)