loleaflet/src/main.js | 1 + loleaflet/src/map/Map.js | 4 ++++ 2 files changed, 5 insertions(+)
New commits: commit d77cecee810542e743abd2efacb8df287c0729c5 Author: Henry Castro <[email protected]> AuthorDate: Tue May 12 15:24:04 2020 -0400 Commit: Henry Castro <[email protected]> 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 <[email protected]> Reviewed-by: Henry Castro <[email protected]> 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], _______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
