Merge pull request #172 from CartoDB/timeslider-remove
Triggers the 'remove' event in onRemove
This commit is contained in:
commit
d7a284082a
1
NEWS
1
NEWS
@ -1,5 +1,6 @@
|
||||
2.11.2
|
||||
- Added error handling to Torque
|
||||
- Fixed 'remove' event triggering when removing a Torque layer.
|
||||
2.11.1
|
||||
- Adapts usage of marker-opacity to Mapnik's functionality
|
||||
- Added getValueForBBox to TorqueLayer's API
|
||||
|
@ -294,6 +294,7 @@ GMapsTorqueLayer.prototype = torque.extend({},
|
||||
},
|
||||
|
||||
onRemove: function() {
|
||||
this.fire('remove');
|
||||
CanvasLayer.prototype.onRemove.call(this);
|
||||
this.animator.stop();
|
||||
this._removeTileLoader();
|
||||
|
@ -127,6 +127,7 @@ L.TorqueLayer = L.CanvasLayer.extend({
|
||||
},
|
||||
|
||||
onRemove: function(map) {
|
||||
this.fire('remove');
|
||||
this._removeTileLoader();
|
||||
map.off({
|
||||
'zoomend': this._clearCaches,
|
||||
|
Loading…
Reference in New Issue
Block a user