From e065f53b9a3b32e86d0531071df86f6e88a42ea8 Mon Sep 17 00:00:00 2001 From: Henrik Uggla Date: Mon, 21 Oct 2024 11:11:12 +0200 Subject: [PATCH] Update infowindow.js --- src/infowindow.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/infowindow.js b/src/infowindow.js index adedb0673..6cd5d5e9c 100644 --- a/src/infowindow.js +++ b/src/infowindow.js @@ -18,9 +18,9 @@ let activeSelectionGroup; let selectionManager; let viewer; let infowindowOptions; -const initialMinimizeButtonIcon = '#ic_close_fullscreen_24px'; -const hiddenMinimizeButtonIcon = '#ic_open_in_full_24px'; -const minimizeButton = createMinimizeButton(); +let initialMinimizeButtonIcon; +let hiddenMinimizeButtonIcon; +let minimizeButton; function createSvgElement(id, className) { const svgContainer = document.createElement('div'); @@ -169,6 +169,7 @@ function render(viewerId) { urvalTextNodeContainer.appendChild(urvalTextNode); urvalContainer.appendChild(urvalTextNodeContainer); const closeButton = createCloseButton(); + minimizeButton = createMinimizeButton(); urvalContainer.appendChild(dom.html(minimizeButton.render())); urvalContainer.appendChild(dom.html(closeButton.render())); urvalContainer.appendChild(urvalListContainer); @@ -481,6 +482,8 @@ function init(options) { urvalElements = new Map(); expandableContents = new Map(); footerContainers = new Map(); + initialMinimizeButtonIcon = '#ic_close_fullscreen_24px'; + hiddenMinimizeButtonIcon = '#ic_open_in_full_24px'; render(options.viewer.getId());