Scale only recipe cooking content

This commit is contained in:
2026-08-03 22:24:41 -05:00
parent bc81e8403d
commit 3e695d6699
5 changed files with 19 additions and 17 deletions
+2 -2
View File
@@ -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) {