[Libreoffice-commits] online.git: loleaflet/src
Henry Castro (via logerrit)
logerrit at kemper.freedesktop.org
Wed May 13 14:08:19 UTC 2020
loleaflet/src/main.js | 1 +
loleaflet/src/map/Map.js | 4 ++++
2 files changed, 5 insertions(+)
New commits:
commit d77cecee810542e743abd2efacb8df287c0729c5
Author: Henry Castro <hcastro at collabora.com>
AuthorDate: Tue May 12 15:24:04 2020 -0400
Commit: Henry Castro <hcastro at collabora.com>
CommitDate: Wed May 13 16:08:01 2020 +0200
loleaflet: assign a static singleton map object
So cypress can access the object and listen some events
when unit test fails
Change-Id: I8b05383a2655865b540306f83ebb5c5d42f1929c
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/94079
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
Reviewed-by: Henry Castro <hcastro at collabora.com>
diff --git a/loleaflet/src/main.js b/loleaflet/src/main.js
index 6b9390058..86826522b 100644
--- a/loleaflet/src/main.js
+++ b/loleaflet/src/main.js
@@ -87,5 +87,6 @@ window.addEventListener('beforeunload', function () {
window.docPermission = permission;
window.bundlejsLoaded = true;
+L.Map.THIS = map;
}(window));
diff --git a/loleaflet/src/map/Map.js b/loleaflet/src/map/Map.js
index 18b168a1e..3eb011500 100644
--- a/loleaflet/src/map/Map.js
+++ b/loleaflet/src/map/Map.js
@@ -14,6 +14,10 @@ function isAnyVexDialogActive() {
/* global vex $ _ */
L.Map = L.Evented.extend({
+ statics: {
+ THIS : undefined
+ },
+
options: {
crs: L.CRS.Simple,
center: [0, 0],
More information about the Libreoffice-commits
mailing list