Merge pull request #285 from CartoDB/unbind-move-event

Unbind map's 'move' event properly when layer is removed from the map
pull/82/merge
Pablo Alonso 8 years ago committed by GitHub
commit 813b3b60dc

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

7
dist/torque.js vendored

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

@ -161,7 +161,7 @@ L.CanvasLayer = L.Layer.extend({
this._container.parentNode.removeChild(this._container);
map.off({
'viewreset': this._reset,
'move': this._render,
'move': this.redraw,
'moveend': this._reset,
'resize': this._reset,
'zoomanim': this._animateZoom,

@ -514,5 +514,10 @@ L.TorqueLayer = L.CanvasLayer.extend({
getStepsRange: function() {
return this.animator.stepsRange();
},
onRemove: function(map) {
L.CanvasLayer.prototype.onRemove.apply(this, arguments);
this.animator.stop();
}
});

Loading…
Cancel
Save