Permalink
Browse files

Fix a bug where Bitmaps couldn't be updated via "source"

  • Loading branch information...
basecode committed Aug 24, 2012
1 parent 74e46ad commit 31975fa565ed210f704174b32181be9a455823d8
Showing with 10 additions and 0 deletions.
  1. +1 −0 CHANGELOG
  2. +7 −0 example/library/movies/bitmap-source.js
  3. +1 −0 example/library/movies/movie_list.js
  4. +1 −0 src/runner/bitmap.js
View
@@ -9,6 +9,7 @@ v0.3.4
* Add `diffX` and `diffY` properties to `pointerup` event object.
* Fix #36 where filters couldn't be removed (thx @qfox)
* Fix a bug where the filter-attribute wasn't removed
+* Fix a bug where Bitmaps weren't updated via "source"
v0.3.3
-------------------
@@ -0,0 +1,7 @@
+var bitmap = new bonsai.Bitmap('assets/redpanda.jpg').addTo(stage);
+
+stage.frames({
+ "2s": function() {
+ bitmap.attr({ source: 'assets/paperbg.png'});
+ }
+});
@@ -18,6 +18,7 @@ movieList = {
],
'Bitmaps and Sprites': [
'bitmap.js',
+ 'bitmap-source.js',
'fill-image.js',
'sprite.js',
'data-url.js',
View
@@ -117,6 +117,7 @@ define([
this._attributes._naturalHeight = data.height;
this._mutatedAttributes.naturalWidth = true;
this._mutatedAttributes.naturalHeight = true;
+ this._mutatedAttributes.absoluteUrl = true;
// We trigger the event asynchronously so as to ensure that any events
// bound after instantiation are still triggered:
this.emitAsync('load', this);

0 comments on commit 31975fa

Please sign in to comment.