From bacf8922c8f5eb0999e977ff5a67a910d1537648 Mon Sep 17 00:00:00 2001 From: Yohan Boniface Date: Thu, 26 Oct 2023 22:38:41 +0200 Subject: [PATCH] Round range step to 1 digit --- umap/static/umap/js/umap.forms.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/umap/static/umap/js/umap.forms.js b/umap/static/umap/js/umap.forms.js index c75d01ec..fe3892f2 100644 --- a/umap/static/umap/js/umap.forms.js +++ b/umap/static/umap/js/umap.forms.js @@ -856,7 +856,7 @@ L.FormBuilder.Range = L.FormBuilder.FloatInput.extend({ this.input.setAttribute('list', datalist.id) let options = '' const step = this.options.step || 1, - digits = step < 1 ? 2 : 0 + digits = step < 1 ? 1 : 0 for (let i = this.options.min; i <= this.options.max; i += this.options.step) { options += `` }