Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fix firing event inside promise callback

  • Loading branch information...
commit a4c672c615baf31feeafaf728decc0c7b32b6a3a 1 parent 8dedc74
@ismyrnow authored
Showing with 2 additions and 1 deletion.
  1. +2 −1  src/leaflet.functionaltilelayer.js
View
3  src/leaflet.functionaltilelayer.js
@@ -49,9 +49,10 @@ L.TileLayer.Functional = L.TileLayer.extend({
});
} else if (typeof tileUrl.then === 'function') {
// Assume we are dealing with a promise.
+ var self = this;
tileUrl.then(function (tileUrl) {
tile.src = tileUrl;
- this.fire('tileloadstart', {
+ self.fire('tileloadstart', {
tile: tile,
url: tile.src
});
Please sign in to comment.
Something went wrong with that request. Please try again.