Avoid exception dragging during shutdown.
Really TileLayer.js should have a clean on remove that dis-connects from drag, resize etc. but it doesn't yet. Change-Id: Ia2c2268875187a2f1115b7d357fd56ab825bb77f Reviewed-on: https://gerrit.libreoffice.org/c/online/+/88578 Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Tested-by: Ashod Nakashian <ashnakash@gmail.com>
This commit is contained in:
parent
2adc32fab5
commit
1bc1034543
1 changed files with 1 additions and 0 deletions
|
@ -446,6 +446,7 @@ L.GridLayer = L.Layer.extend({
|
|||
},
|
||||
|
||||
_updateScrollOffset: function () {
|
||||
if (!this._map) return;
|
||||
var centerPixel = this._map.project(this._map.getCenter());
|
||||
var newScrollPos = centerPixel.subtract(this._map.getSize().divideBy(2));
|
||||
var x = Math.round(newScrollPos.x < 0 ? 0 : newScrollPos.x);
|
||||
|
|
Loading…
Reference in a new issue