~martijnbraam/fathub

Round ingredient amount to 2 decimal places for better readability v1 PROPOSED

Herman: 1
 Round ingredient amount to 2 decimal places for better readability

 1 files changed, 2 insertions(+), 2 deletions(-)
Export patchset (mbox)
How do I use this?

Copy & paste the following snippet into your terminal to import this patchset into git:

curl -s https://lists.sr.ht/~martijnbraam/fathub/patches/22480/mbox | git am -3
Learn more about email & git

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

---
 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