mirror of
https://github.com/Ellpeck/ObsidianCustomFrames.git
synced 2024-11-14 14:59:08 +01:00
use Platform.isDesktop for minimum width
This commit is contained in:
parent
5a6bf176e7
commit
c7d6ee8702
1 changed files with 7 additions and 7 deletions
14
main.ts
14
main.ts
|
@ -102,14 +102,14 @@ class CustomFrameView extends ItemView {
|
|||
`);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (this.frame.minimumWidth) {
|
||||
let parent = this.contentEl.closest<HTMLElement>(".workspace-split.mod-horizontal");
|
||||
if (parent) {
|
||||
let minWidth = `${this.frame.minimumWidth + 2 * this.settings.padding}px`;
|
||||
if (parent.style.width < minWidth)
|
||||
parent.style.width = minWidth;
|
||||
}
|
||||
if (Platform.isDesktop && this.frame.minimumWidth) {
|
||||
let parent = this.contentEl.closest<HTMLElement>(".workspace-split.mod-horizontal");
|
||||
if (parent) {
|
||||
let minWidth = `${this.frame.minimumWidth + 2 * this.settings.padding}px`;
|
||||
if (parent.style.width < minWidth)
|
||||
parent.style.width = minWidth;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue