Merge pull request #285 from CartoDB/unbind-move-event
Unbind map's 'move' event properly when layer is removed from the map
This commit is contained in:
commit
813b3b60dc
25
dist/torque.full.js
vendored
25
dist/torque.full.js
vendored
File diff suppressed because one or more lines are too long
28994
dist/torque.full.uncompressed.js
vendored
28994
dist/torque.full.uncompressed.js
vendored
File diff suppressed because one or more lines are too long
7
dist/torque.js
vendored
7
dist/torque.js
vendored
File diff suppressed because one or more lines are too long
1025
dist/torque.uncompressed.js
vendored
1025
dist/torque.uncompressed.js
vendored
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);
|
this._container.parentNode.removeChild(this._container);
|
||||||
map.off({
|
map.off({
|
||||||
'viewreset': this._reset,
|
'viewreset': this._reset,
|
||||||
'move': this._render,
|
'move': this.redraw,
|
||||||
'moveend': this._reset,
|
'moveend': this._reset,
|
||||||
'resize': this._reset,
|
'resize': this._reset,
|
||||||
'zoomanim': this._animateZoom,
|
'zoomanim': this._animateZoom,
|
||||||
|
@ -514,5 +514,10 @@ L.TorqueLayer = L.CanvasLayer.extend({
|
|||||||
|
|
||||||
getStepsRange: function() {
|
getStepsRange: function() {
|
||||||
return this.animator.stepsRange();
|
return this.animator.stepsRange();
|
||||||
|
},
|
||||||
|
|
||||||
|
onRemove: function(map) {
|
||||||
|
L.CanvasLayer.prototype.onRemove.apply(this, arguments);
|
||||||
|
this.animator.stop();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user