use Platform.isDesktop for minimum width

This commit is contained in:
Ell 2022-03-23 11:45:08 +01:00
parent 5a6bf176e7
commit c7d6ee8702

View file

@ -102,8 +102,9 @@ class CustomFrameView extends ItemView {
`); `);
} }
} }
}
if (this.frame.minimumWidth) { if (Platform.isDesktop && this.frame.minimumWidth) {
let parent = this.contentEl.closest<HTMLElement>(".workspace-split.mod-horizontal"); let parent = this.contentEl.closest<HTMLElement>(".workspace-split.mod-horizontal");
if (parent) { if (parent) {
let minWidth = `${this.frame.minimumWidth + 2 * this.settings.padding}px`; let minWidth = `${this.frame.minimumWidth + 2 * this.settings.padding}px`;
@ -111,7 +112,6 @@ class CustomFrameView extends ItemView {
parent.style.width = minWidth; parent.style.width = minWidth;
} }
} }
}
}; };
frame.src = this.frame.url; frame.src = this.frame.url;
} }