fix: prevent clipped recipe content
This commit is contained in:
1 parent
fb7d275689
commit
3f35f173ad
3 files changed
+16
-8
No files matched your search
@@ -62,7 +62,7 @@ Module.register("MMM-NextcloudCookbook", {
|
||||
const availableWidth = root.clientWidth
|
||||
- Number.parseFloat(style.paddingLeft)
|
||||
- Number.parseFloat(style.paddingRight);
|
||||
let minimum = 0.45;
|
||||
let minimum = 0.2;
|
||||
let maximum = 2;
|
||||
let best = minimum;
|
||||
|
||||
@@ -79,6 +79,9 @@ Module.register("MMM-NextcloudCookbook", {
|
||||
}
|
||||
}
|
||||
root.style.setProperty("--ncc-content-scale", best.toFixed(3));
|
||||
const stillOverflows = recipe.scrollHeight > availableHeight
|
||||
|| recipe.scrollWidth > availableWidth;
|
||||
root.classList.toggle("ncc-scrollable", stillOverflows);
|
||||
},
|
||||
|
||||
setRecipeMode(active) {
|
||||
|
||||
Reference in new issue
Block a user