Merge pull request #1570 from thecodingmachine/fixZoom

Fix zoom
This commit is contained in:
David Négrier 2021-11-17 16:19:26 +01:00 committed by GitHub
commit 3487fa90e0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 13 additions and 0 deletions

View File

@ -361,6 +361,8 @@ class CoWebsiteManager {
oldSlot.container.style.display = "none"; oldSlot.container.style.display = "none";
} }
this.displayCowebsiteContainer();
newSlot.container.style.display = "block"; newSlot.container.style.display = "block";
coWebsite.iframe.classList.remove("pixel"); coWebsite.iframe.classList.remove("pixel");
@ -368,6 +370,14 @@ class CoWebsiteManager {
this.resizeAllIframes(); 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) { private moveLeftPreviousCoWebsite(coWebsite: CoWebsite, newPosition: number) {
const nextCoWebsite = this.getCoWebsiteByPosition(coWebsite.position + 1); const nextCoWebsite = this.getCoWebsiteByPosition(coWebsite.position + 1);
@ -422,6 +432,8 @@ class CoWebsiteManager {
this.moveLeftPreviousCoWebsite(previousCoWebsite, coWebsite.position); this.moveLeftPreviousCoWebsite(previousCoWebsite, coWebsite.position);
} }
this.displayCowebsiteContainer();
coWebsite.icon.remove(); coWebsite.icon.remove();
coWebsite.iframe.remove(); coWebsite.iframe.remove();
} }

View File

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