loleaflet/src/map/Map.js | 35 +++-------------------------------- 1 file changed, 3 insertions(+), 32 deletions(-)
New commits: commit 42047a3b8f314ccefbfac296cae2b14795c6f150 Author: Henry Castro <hcas...@collabora.com> AuthorDate: Tue Aug 7 21:10:19 2018 -0400 Commit: Henry Castro <hcas...@collabora.com> CommitDate: Wed Aug 8 16:16:47 2018 -0400 loleaflet: mobile: fix invalidate size Change-Id: Ic4d06f2cf9a945bef4e8b81acd483238bf4e2bdb diff --git a/loleaflet/src/map/Map.js b/loleaflet/src/map/Map.js index f29dbe4cb..4b78babe8 100644 --- a/loleaflet/src/map/Map.js +++ b/loleaflet/src/map/Map.js @@ -351,41 +351,12 @@ L.Map = L.Evented.extend({ return this.panTo(newCenter, options); }, - invalidateSize: function (options) { + invalidateSize: function () { if (!this._loaded) { return this; } - options = L.extend({ - animate: false, - pan: true - }, options === true ? {animate: true} : options); - var oldSize = this.getSize(); this._sizeChanged = true; - - var newSize = this.getSize(), - oldCenter = oldSize.divideBy(2).round(), - newCenter = newSize.divideBy(2).round(), - offset = oldCenter.subtract(newCenter); - - if (!offset.x && !offset.y) { return this; } - - if (options.animate && options.pan) { - this.panBy(offset); - - } else { - if (options.pan) { - this._rawPanBy(offset); - } - - this.fire('move'); - - if (options.debounceMoveend) { - clearTimeout(this._sizeTimer); - this._sizeTimer = setTimeout(L.bind(this.fire, this, 'moveend'), 200); - } else { - this.fire('moveend'); - } - } + var newSize = this.getSize(); return this.fire('resize', { oldSize: oldSize, @@ -829,7 +800,7 @@ L.Map = L.Evented.extend({ _onResize: function () { L.Util.cancelAnimFrame(this._resizeRequest); this._resizeRequest = L.Util.requestAnimFrame( - function () { this.invalidateSize({debounceMoveend: true}); }, this, false, this._container); + function () { this.invalidateSize(); }, this, false, this._container); }, _activate: function () { _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits