Skip to content

Commit 190542f

Browse files
committed
Fixed an image preload issue with SpriteSheet.
Signed-off-by: Grant Skinner <info@gskinner.com>
1 parent 0d56b7e commit 190542f

File tree

3 files changed

+8
-2
lines changed

3 files changed

+8
-2
lines changed

VERSIONS.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
Version 0.4.1 [Not released]
2+
****************************************************************************************************
3+
- fixed a problem with preloading sprite sheet images when using tile based sheets
4+
- worked around a bug in Safari with addFlippedFrames
5+
6+
17
Version 0.4 [Nov 30, 2011]
28
****************************************************************************************************
39
- completely rewrote BitmapSequence (now BitmapAnimation) & SpriteSheet including data format

src/easeljs/display/BitmapAnimation.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -361,4 +361,4 @@ var p = BitmapAnimation.prototype = new DisplayObject();
361361
}
362362

363363
window.BitmapAnimation = BitmapAnimation;
364-
}(window));
364+
}(window));

src/easeljs/display/SpriteSheet.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ var p = SpriteSheet.prototype;
215215
if (!img.getContext && !img.complete) {
216216
this._loadCount++;
217217
this.complete = false;
218-
img.onload = this._handleImageLoad();
218+
(function(o) { img.onload = function() { o._handleImageLoad(); } })(this);
219219
}
220220
}
221221
}

0 commit comments

Comments
 (0)