Skip to content

Commit

Permalink
Added quiesce event (formerly known as loaded) to sprites and tiles.
Browse files Browse the repository at this point in the history
  • Loading branch information
blythest committed Jan 7, 2016
1 parent dbf9562 commit 6881f1d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions js/style/style.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ function Style(stylesheet, animationLoop) {

if (stylesheet.sprite) {
this.sprite = new ImageSprite(stylesheet.sprite);
this.sprite.on('load', this.fire.bind(this, 'change'));
this.sprite.on('load', this.fire.bind(this, ['change', 'sprites.quiesce']));
}

this.glyphSource = new GlyphSource(stylesheet.glyphs, this.glyphAtlas);
Expand Down Expand Up @@ -448,7 +448,7 @@ Style.prototype = util.inherit(Evented, {
_forwardTileEvent: function(e) {
if (e.type === 'tile.load') {
if (this.loaded()) {
this.fire('tiles.loaded');
this.fire('tiles.quiesce');
}
}
this.fire(e.type, util.extend({source: e.target}, e));
Expand Down

0 comments on commit 6881f1d

Please sign in to comment.