Skip to content

Commit

Permalink
Update infowindow.js
Browse files Browse the repository at this point in the history
  • Loading branch information
huggla authored Jun 25, 2024
1 parent e7f1b1d commit ec02229
Showing 1 changed file with 12 additions and 18 deletions.
30 changes: 12 additions & 18 deletions src/infowindow.js
Original file line number Diff line number Diff line change
Expand Up @@ -120,27 +120,21 @@ function createMinimizeButton() {
}

function minimizeInfowindow() {
const sidebarcontainer = document.getElementById('sidebarcontainer');
const urvalcontainer = document.getElementById('sidebarcontainer-draggable');
const urvalListContainer = urvalcontainer.getElementsByClassName('urvalListContainer')[0];
const listcontainer = sidebarcontainer.getElementsByClassName('listcontainer')[0];
const exportcontainer = sidebarcontainer.getElementsByClassName('exportcontainer')[0];
const buttonuse = urvalcontainer.querySelector('[aria-label="Minimera"]').querySelector('use');
const minimizeButtonUse = urvalContainer.querySelector('[aria-label="Minimera"]').querySelector('use');
if (urvalListContainer.style.display === 'none') {
urvalListContainer.style.display = null;
sidebarcontainer.style.width = null;
urvalcontainer.style.padding = null;
listcontainer.style.display = null;
exportcontainer.style.display = null;
buttonuse.setAttribute('xlink:href', '#ic_close_fullscreen_24px');
}
else {
mainContainer.style.width = null;
urvalContainer.style.padding = null;
listContainer.style.display = null;
exportContainer.style.display = null;
minimizeButtonUse.setAttribute('xlink:href', '#ic_close_fullscreen_24px');
} else {
urvalListContainer.style.display = 'none';
sidebarcontainer.style.width = 'fit-content';
urvalcontainer.style.padding = '9px 5em 2px 0.5em';
listcontainer.style.display = 'none';
exportcontainer.style.display = 'none';
buttonuse.setAttribute('xlink:href', '#ic_open_in_full_24px');
mainContainer.style.width = 'fit-content';
urvalContainer.style.padding = '9px 5em 2px 0.5em';
listContainer.style.display = 'none';
exportContainer.style.display = 'none';
minimizeButtonUse.setAttribute('xlink:href', '#ic_open_in_full_24px');
}
}

Expand Down

0 comments on commit ec02229

Please sign in to comment.