From c4a0185c0fe444e76fc6591c7e85c6ad68571d2b Mon Sep 17 00:00:00 2001 From: Chad Engler Date: Sun, 9 Feb 2014 12:02:33 -0800 Subject: [PATCH] Pass loader that completed, fixes #213 --- src/pixi/loaders/AssetLoader.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/pixi/loaders/AssetLoader.js b/src/pixi/loaders/AssetLoader.js index 0dda750..dd00c40 100644 --- a/src/pixi/loaders/AssetLoader.js +++ b/src/pixi/loaders/AssetLoader.js @@ -112,8 +112,8 @@ PIXI.AssetLoader.prototype.load = function() { var scope = this; - function onLoad() { - scope.onAssetLoaded(); + function onLoad(evt) { + scope.onAssetLoaded(evt.loader); } this.loadCount = this.assetURLs.length; @@ -145,11 +145,11 @@ PIXI.AssetLoader.prototype.load = function() * @method onAssetLoaded * @private */ -PIXI.AssetLoader.prototype.onAssetLoaded = function() +PIXI.AssetLoader.prototype.onAssetLoaded = function(loader) { this.loadCount--; - this.dispatchEvent({type: 'onProgress', content: this}); - if (this.onProgress) this.onProgress(); + this.dispatchEvent({ type: 'onProgress', content: this, loader: loader }); + if (this.onProgress) this.onProgress(loader); if (!this.loadCount) {