Scale only recipe cooking content
This commit is contained in:
@@ -58,7 +58,7 @@ Module.register("MMM-NextcloudCookbook", {
|
||||
|
||||
for (let attempt = 0; attempt < 12; attempt++) {
|
||||
const scale = (minimum + maximum) / 2;
|
||||
root.style.setProperty("--ncc-type-scale", scale);
|
||||
root.style.setProperty("--ncc-content-scale", scale);
|
||||
const fits = recipe.scrollHeight <= availableHeight
|
||||
&& recipe.scrollWidth <= availableWidth;
|
||||
if (fits) {
|
||||
@@ -68,7 +68,7 @@ Module.register("MMM-NextcloudCookbook", {
|
||||
maximum = scale;
|
||||
}
|
||||
}
|
||||
root.style.setProperty("--ncc-type-scale", best.toFixed(3));
|
||||
root.style.setProperty("--ncc-content-scale", best.toFixed(3));
|
||||
},
|
||||
|
||||
setRecipeMode(active) {
|
||||
|
||||
Reference in New Issue
Block a user