Skip to content

Commit

Permalink
fix render tests 🎨
Browse files Browse the repository at this point in the history
  • Loading branch information
Molly Lloyd committed Mar 2, 2017
1 parent 8c1eae3 commit e770240
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/source/source_cache.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ class SourceCache extends Evented {
});

this.on('source.update', function(event) {
if (this._sourceLoaded && event.dataType === 'source') {
if (this._sourceLoaded) {
this.reload();
if (this.transform) {
this.update(this.transform);
Expand Down Expand Up @@ -291,6 +291,7 @@ class SourceCache extends Evented {
* @private
*/
update(transform) {
this.transform = transform;
if (!this._sourceLoaded) { return; }
let i;
let coord;
Expand Down Expand Up @@ -389,8 +390,6 @@ class SourceCache extends Evented {
for (i = 0; i < remove.length; i++) {
this.removeTile(+remove[i]);
}

this.transform = transform;
}

/**
Expand Down
2 changes: 2 additions & 0 deletions src/source/vector_tile_source.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,9 @@ class VectorTileSource extends Evented {
return;
}
util.extend(this, tileJSON);

this.fire('source.load');
this.fire('source.update');
});
}

Expand Down

0 comments on commit e770240

Please sign in to comment.