Merge pull request #172 from CartoDB/timeslider-remove

Triggers the 'remove' event in onRemove
This commit is contained in:
Francisco Dans 2015-04-20 19:03:42 +02:00
commit d7a284082a
3 changed files with 3 additions and 0 deletions

1
NEWS
View File

@ -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

View File

@ -294,6 +294,7 @@ GMapsTorqueLayer.prototype = torque.extend({},
},
onRemove: function() {
this.fire('remove');
CanvasLayer.prototype.onRemove.call(this);
this.animator.stop();
this._removeTileLoader();

View File

@ -127,6 +127,7 @@ L.TorqueLayer = L.CanvasLayer.extend({
},
onRemove: function(map) {
this.fire('remove');
this._removeTileLoader();
map.off({
'zoomend': this._clearCaches,