~martijnbraam/fathub

This thread contains a patchset. You're looking at the original emails, but you may wish to use the patch review UI. Review patch

[PATCH] Round ingredient amount to 2 decimal places for better readability

Details
Message ID
<20210502190833.12755-1-herman@spiralarms.org>
DKIM signature
missing
Download raw message
Patch: +2 -2
---
 static/recipe.js | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/static/recipe.js b/static/recipe.js
index 4bbe3e5..5a472b6 100644
--- a/static/recipe.js
+++ b/static/recipe.js
@@ -11,7 +11,7 @@ function update_ingredient_list() {
}

function adjust_serves() {
    serve_fraction = this.value / this.dataset.original;
    serve_fraction = (this.value / this.dataset.original).toFixed(2);
    update_ingredient_list();
}

@@ -28,4 +28,4 @@ function add_dynamic_controls() {

document.addEventListener("DOMContentLoaded", function () {
    add_dynamic_controls();
});
\ No newline at end of file
});
-- 
2.26.3
Reply to thread Export thread (mbox)