From 8c325e04a0b3266da44b6d86264a4dde1fbbd9d0 Mon Sep 17 00:00:00 2001 From: eric1tran Date: Mon, 14 Dec 2020 23:24:45 +0000 Subject: [PATCH] Fix up long decimal issue for min/max altitude values --- public_html/script.js | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/public_html/script.js b/public_html/script.js index 1bc5af8..82fe525 100644 --- a/public_html/script.js +++ b/public_html/script.js @@ -309,17 +309,10 @@ function initialize() { 'min': 0, 'max': 65000 }, - step: 5, + step: 25, format: { - // 'to' the formatted value. Receives a number. - to: function (value) { - return value; - }, - // 'from' the formatted value. - // Receives a string, should return a number. - from: function (value) { - return value; - } + to: (v) => parseFloat(v).toFixed(0), + from: (v) => parseFloat(v).toFixed(0) } });