From a360ca0e130b6383b572e9e02bc6b3d2ab61f319 Mon Sep 17 00:00:00 2001 From: Yohan Boniface Date: Tue, 12 Mar 2024 17:08:51 +0100 Subject: [PATCH] chore: make browser expanded/condensed mode persistent --- umap/static/umap/js/umap.ui.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/umap/static/umap/js/umap.ui.js b/umap/static/umap/js/umap.ui.js index ad881fde..ceaca6a2 100644 --- a/umap/static/umap/js/umap.ui.js +++ b/umap/static/umap/js/umap.ui.js @@ -68,7 +68,15 @@ U.UI = L.Evented.extend({ }, resizePanel: function () { - this._panel.classList.toggle('condensed') + if (this.PANEL_MODE === 'expanded') { + this.PANEL_MODE = 'condensed' + this._panel.classList.remove('expanded') + this._panel.classList.add('condensed') + } else { + this.PANEL_MODE = 'expanded' + this._panel.classList.remove('condensed') + this._panel.classList.add('expanded') + } }, closePanel: function () {