[Libreoffice-commits] online.git: loleaflet/src

Henry Castro (via logerrit) logerrit at kemper.freedesktop.org
Thu Feb 6 14:01:04 UTC 2020


 loleaflet/src/map/Map.js |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

New commits:
commit 2a66a65c7516794e3d37320e86603ef6cf7d638a
Author:     Henry Castro <hcastro at collabora.com>
AuthorDate: Thu Feb 6 08:23:46 2020 -0400
Commit:     Henry Castro <hcastro at collabora.com>
CommitDate: Thu Feb 6 15:00:39 2020 +0100

    loleaflet: mobile: add event listener 'resize'
    
    Since no longer it is used 'iframe' element ensure
    to add event listener 'resize' of the window object
    
    Change-Id: I89d301ddaf9e5f26c9cbf0c87c8ee157fe77247b
    Reviewed-on: https://gerrit.libreoffice.org/c/online/+/88099
    Reviewed-by: Henry Castro <hcastro at collabora.com>
    Tested-by: Henry Castro <hcastro at collabora.com>

diff --git a/loleaflet/src/map/Map.js b/loleaflet/src/map/Map.js
index 3ffc476ae..e7a75f205 100644
--- a/loleaflet/src/map/Map.js
+++ b/loleaflet/src/map/Map.js
@@ -1097,8 +1097,10 @@ L.Map = L.Evented.extend({
 
 		this._mainEvents(onOff);
 
-		if (this.options.trackResize && this._resizeDetector && this._resizeDetector.contentWindow) {
-			L.DomEvent[onOff](this._resizeDetector.contentWindow, 'resize', this._onResize, this);
+		if (this.options.trackResize) {
+			var winTarget = this._resizeDetector && this._resizeDetector.contentWindow ? this._resizeDetector.contentWindow :
+				window;
+			L.DomEvent[onOff](winTarget, 'resize', this._onResize, this);
 		}
 
 		L.DomEvent[onOff](window, 'blur', this._onLostFocus, this);


More information about the Libreoffice-commits mailing list