Fix zoom from cowebsite changes

This commit is contained in:
Alexis Faizeau 2021-11-17 15:26:58 +01:00
parent 80c314bb9e
commit 44c99fb0ef
2 changed files with 13 additions and 0 deletions

View file

@ -361,6 +361,8 @@ class CoWebsiteManager {
oldSlot.container.style.display = "none";
}
this.displayCowebsiteContainer();
newSlot.container.style.display = "block";
coWebsite.iframe.classList.remove("pixel");
@ -368,6 +370,14 @@ class CoWebsiteManager {
this.resizeAllIframes();
}
private displayCowebsiteContainer() {
if (this.coWebsites.find((cowebsite) => cowebsite.position > 0)) {
this.cowebsiteContainerDom.style.display = "block";
} else {
this.cowebsiteContainerDom.style.display = "none";
}
}
private moveLeftPreviousCoWebsite(coWebsite: CoWebsite, newPosition: number) {
const nextCoWebsite = this.getCoWebsiteByPosition(coWebsite.position + 1);
@ -422,6 +432,8 @@ class CoWebsiteManager {
this.moveLeftPreviousCoWebsite(previousCoWebsite, coWebsite.position);
}
this.displayCowebsiteContainer();
coWebsite.icon.remove();
coWebsite.iframe.remove();
}

View file

@ -65,6 +65,7 @@
&-container {
position: absolute;
display: none;
height: 100%;
width: 100%;