Skip to content

Commit

Permalink
Remove dead code from ImageSource
Browse files Browse the repository at this point in the history
The image that's passed to the callback has already been loaded; this event binding will never be triggered.
  • Loading branch information
jfirebaugh committed Sep 22, 2016
1 parent 56e9761 commit a1c6e2f
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 6 deletions.
5 changes: 0 additions & 5 deletions js/source/image_source.js
Expand Up @@ -52,11 +52,6 @@ function ImageSource(id, options, dispatcher) {
if (err) return this.fire('error', {error: err});

this.image = image;

this.image.addEventListener('load', function() {
this.map._rerender();
}.bind(this));

this._loaded = true;
this.fire('load');

Expand Down
1 change: 0 additions & 1 deletion test/suite_implementation.js
Expand Up @@ -106,7 +106,6 @@ function fakeImage(png) {
height: png.height,
data: png.data.slice(),
complete: true,
addEventListener: function() {},
getData: function() { return this.data; }
};
}
Expand Down

0 comments on commit a1c6e2f

Please sign in to comment.