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
29036
dist/torque.full.uncompressed.js
vendored
29036
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
1063
dist/torque.uncompressed.js
vendored
1063
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);
|
||||
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…
Reference in New Issue
Block a user