mirror of
https://github.com/Ellpeck/ObsidianCustomFrames.git
synced 2024-11-22 09:43:30 +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) {
|
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`;
|
||||||
if (parent.style.width < minWidth)
|
if (parent.style.width < minWidth)
|
||||||
parent.style.width = minWidth;
|
parent.style.width = minWidth;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue