@pixi/runner
Advanced tools
Comparing version 5.1.0 to 5.1.1
/*! | ||
* @pixi/runner - v5.1.0 | ||
* Compiled Fri, 19 Jul 2019 21:54:36 UTC | ||
* @pixi/runner - v5.1.1 | ||
* Compiled Fri, 02 Aug 2019 23:20:23 UTC | ||
* | ||
@@ -57,2 +57,3 @@ * @pixi/runner is licensed under the MIT License. | ||
this._name = name; | ||
this._aliasCount = 0; | ||
}; | ||
@@ -77,2 +78,4 @@ | ||
this._aliasCount++; | ||
for (var i = 0, len = items.length; i < len; i++) | ||
@@ -83,5 +86,19 @@ { | ||
if (items === this.items) | ||
{ | ||
this._aliasCount--; | ||
} | ||
return this; | ||
}; | ||
Runner.prototype.ensureNonAliasedItems = function ensureNonAliasedItems () | ||
{ | ||
if (this._aliasCount > 0 && this.items.length > 1) | ||
{ | ||
this._aliasCount = 0; | ||
this.items = this.items.slice(0); | ||
} | ||
}; | ||
/** | ||
@@ -108,2 +125,3 @@ * Add a listener to the Runner | ||
{ | ||
this.ensureNonAliasedItems(); | ||
this.remove(item); | ||
@@ -126,2 +144,3 @@ this.items.push(item); | ||
{ | ||
this.ensureNonAliasedItems(); | ||
this.items.splice(index, 1); | ||
@@ -147,2 +166,3 @@ } | ||
{ | ||
this.ensureNonAliasedItems(); | ||
this.items.length = 0; | ||
@@ -149,0 +169,0 @@ |
/*! | ||
* @pixi/runner - v5.1.0 | ||
* Compiled Fri, 19 Jul 2019 21:54:36 UTC | ||
* @pixi/runner - v5.1.1 | ||
* Compiled Fri, 02 Aug 2019 23:20:23 UTC | ||
* | ||
@@ -8,3 +8,3 @@ * @pixi/runner is licensed under the MIT License. | ||
*/ | ||
this.PIXI=this.PIXI||{};var _pixi_runner=function(t){"use strict";var e=function(t){this.items=[],this._name=t},i={empty:{configurable:!0},name:{configurable:!0}};return e.prototype.emit=function(t,e,i,n,r,o,s,h){if(arguments.length>8)throw new Error("max arguments reached");for(var p=this.name,u=this.items,m=0,a=u.length;m<a;m++)u[m][p](t,e,i,n,r,o,s,h);return this},e.prototype.add=function(t){return t[this._name]&&(this.remove(t),this.items.push(t)),this},e.prototype.remove=function(t){var e=this.items.indexOf(t);return-1!==e&&this.items.splice(e,1),this},e.prototype.contains=function(t){return-1!==this.items.indexOf(t)},e.prototype.removeAll=function(){return this.items.length=0,this},e.prototype.destroy=function(){this.removeAll(),this.items=null,this._name=null},i.empty.get=function(){return 0===this.items.length},i.name.get=function(){return this._name},Object.defineProperties(e.prototype,i),e.prototype.dispatch=e.prototype.emit,e.prototype.run=e.prototype.emit,t.Runner=e,t}({});Object.assign(this.PIXI,_pixi_runner); | ||
this.PIXI=this.PIXI||{};var _pixi_runner=function(t){"use strict";var e=function(t){this.items=[],this._name=t,this._aliasCount=0},i={empty:{configurable:!0},name:{configurable:!0}};return e.prototype.emit=function(t,e,i,s,n,r,o,h){if(arguments.length>8)throw new Error("max arguments reached");var u=this.name,a=this.items;this._aliasCount++;for(var m=0,p=a.length;m<p;m++)a[m][u](t,e,i,s,n,r,o,h);return a===this.items&&this._aliasCount--,this},e.prototype.ensureNonAliasedItems=function(){this._aliasCount>0&&this.items.length>1&&(this._aliasCount=0,this.items=this.items.slice(0))},e.prototype.add=function(t){return t[this._name]&&(this.ensureNonAliasedItems(),this.remove(t),this.items.push(t)),this},e.prototype.remove=function(t){var e=this.items.indexOf(t);return-1!==e&&(this.ensureNonAliasedItems(),this.items.splice(e,1)),this},e.prototype.contains=function(t){return-1!==this.items.indexOf(t)},e.prototype.removeAll=function(){return this.ensureNonAliasedItems(),this.items.length=0,this},e.prototype.destroy=function(){this.removeAll(),this.items=null,this._name=null},i.empty.get=function(){return 0===this.items.length},i.name.get=function(){return this._name},Object.defineProperties(e.prototype,i),e.prototype.dispatch=e.prototype.emit,e.prototype.run=e.prototype.emit,t.Runner=e,t}({});Object.assign(this.PIXI,_pixi_runner); | ||
//# sourceMappingURL=runner.min.js.map |
/*! | ||
* @pixi/runner - v5.1.0 | ||
* Compiled Fri, 19 Jul 2019 21:54:36 UTC | ||
* @pixi/runner - v5.1.1 | ||
* Compiled Fri, 02 Aug 2019 23:20:23 UTC | ||
* | ||
@@ -53,2 +53,3 @@ * @pixi/runner is licensed under the MIT License. | ||
this._name = name; | ||
this._aliasCount = 0; | ||
}; | ||
@@ -73,2 +74,4 @@ | ||
this._aliasCount++; | ||
for (var i = 0, len = items.length; i < len; i++) | ||
@@ -79,5 +82,19 @@ { | ||
if (items === this.items) | ||
{ | ||
this._aliasCount--; | ||
} | ||
return this; | ||
}; | ||
Runner.prototype.ensureNonAliasedItems = function ensureNonAliasedItems () | ||
{ | ||
if (this._aliasCount > 0 && this.items.length > 1) | ||
{ | ||
this._aliasCount = 0; | ||
this.items = this.items.slice(0); | ||
} | ||
}; | ||
/** | ||
@@ -104,2 +121,3 @@ * Add a listener to the Runner | ||
{ | ||
this.ensureNonAliasedItems(); | ||
this.remove(item); | ||
@@ -122,2 +140,3 @@ this.items.push(item); | ||
{ | ||
this.ensureNonAliasedItems(); | ||
this.items.splice(index, 1); | ||
@@ -143,2 +162,3 @@ } | ||
{ | ||
this.ensureNonAliasedItems(); | ||
this.items.length = 0; | ||
@@ -145,0 +165,0 @@ |
/*! | ||
* @pixi/runner - v5.1.0 | ||
* Compiled Fri, 19 Jul 2019 21:54:36 UTC | ||
* @pixi/runner - v5.1.1 | ||
* Compiled Fri, 02 Aug 2019 23:20:23 UTC | ||
* | ||
@@ -57,2 +57,3 @@ * @pixi/runner is licensed under the MIT License. | ||
this._name = name; | ||
this._aliasCount = 0; | ||
}; | ||
@@ -77,2 +78,4 @@ | ||
this._aliasCount++; | ||
for (var i = 0, len = items.length; i < len; i++) | ||
@@ -83,5 +86,19 @@ { | ||
if (items === this.items) | ||
{ | ||
this._aliasCount--; | ||
} | ||
return this; | ||
}; | ||
Runner.prototype.ensureNonAliasedItems = function ensureNonAliasedItems () | ||
{ | ||
if (this._aliasCount > 0 && this.items.length > 1) | ||
{ | ||
this._aliasCount = 0; | ||
this.items = this.items.slice(0); | ||
} | ||
}; | ||
/** | ||
@@ -108,2 +125,3 @@ * Add a listener to the Runner | ||
{ | ||
this.ensureNonAliasedItems(); | ||
this.remove(item); | ||
@@ -126,2 +144,3 @@ this.items.push(item); | ||
{ | ||
this.ensureNonAliasedItems(); | ||
this.items.splice(index, 1); | ||
@@ -147,2 +166,3 @@ } | ||
{ | ||
this.ensureNonAliasedItems(); | ||
this.items.length = 0; | ||
@@ -149,0 +169,0 @@ |
{ | ||
"name": "@pixi/runner", | ||
"version": "5.1.0", | ||
"version": "5.1.1", | ||
"main": "lib/runner.js", | ||
@@ -41,3 +41,3 @@ "module": "lib/runner.es.js", | ||
], | ||
"gitHead": "05c5e0e0beba56e886c74f201bf7efe576612570" | ||
"gitHead": "40e1e4a12518ee067c6871dcdd930602346197de" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
47596
595