Zoom x 2 thumbnail cowebsite
This commit is contained in:
parent
f84c4b3276
commit
fbff7491df
@ -298,10 +298,17 @@ class CoWebsiteManager {
|
|||||||
private setIframeOffset(coWebsite: CoWebsite, slot: CoWebsiteSlot) {
|
private setIframeOffset(coWebsite: CoWebsite, slot: CoWebsiteSlot) {
|
||||||
const bounding = slot.container.getBoundingClientRect();
|
const bounding = slot.container.getBoundingClientRect();
|
||||||
|
|
||||||
coWebsite.iframe.style.top = bounding.top + 'px';
|
if (coWebsite.iframe.classList.contains('thumbnail')) {
|
||||||
coWebsite.iframe.style.left = bounding.left + 'px';
|
coWebsite.iframe.style.width = ((bounding.right - bounding.left) * 2) + 'px';
|
||||||
coWebsite.iframe.style.width = (bounding.right - bounding.left) + 'px';
|
coWebsite.iframe.style.height = ((bounding.bottom - bounding.top) * 2) + 'px';
|
||||||
coWebsite.iframe.style.height = (bounding.bottom - bounding.top) + 'px';
|
coWebsite.iframe.style.top = (bounding.top - (Math.floor(bounding.height * 0.5))) + 'px';
|
||||||
|
coWebsite.iframe.style.left = (bounding.left - (Math.floor(bounding.width * 0.5))) + 'px';
|
||||||
|
} else {
|
||||||
|
coWebsite.iframe.style.top = bounding.top + 'px';
|
||||||
|
coWebsite.iframe.style.left = bounding.left + 'px';
|
||||||
|
coWebsite.iframe.style.width = (bounding.right - bounding.left) + 'px';
|
||||||
|
coWebsite.iframe.style.height = (bounding.bottom - bounding.top) + 'px';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private resizeAllIframes() {
|
private resizeAllIframes() {
|
||||||
@ -338,6 +345,12 @@ class CoWebsiteManager {
|
|||||||
coWebsite.iframe.classList.remove('sub-main');
|
coWebsite.iframe.classList.remove('sub-main');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (newPosition >= 2) {
|
||||||
|
coWebsite.iframe.classList.add('thumbnail');
|
||||||
|
} else {
|
||||||
|
coWebsite.iframe.classList.remove('thumbnail');
|
||||||
|
}
|
||||||
|
|
||||||
coWebsite.position = newPosition;
|
coWebsite.position = newPosition;
|
||||||
|
|
||||||
if (oldSlot && !this.getCoWebsiteByPosition(oldSlot.position)) {
|
if (oldSlot && !this.getCoWebsiteByPosition(oldSlot.position)) {
|
||||||
|
Loading…
Reference in New Issue
Block a user