From 32903324ae67ec39d07b1675fef8a5e56ca391fc Mon Sep 17 00:00:00 2001 From: thyttan <6uuxstm66@mozmail.com⁩> Date: Thu, 17 Aug 2023 02:47:26 +0200 Subject: [PATCH] SliderInput: be lazy about running callback funct only run if the sliders level was changed. --- modules/SliderInput.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/SliderInput.js b/modules/SliderInput.js index 1ac7d2873..495d1933e 100644 --- a/modules/SliderInput.js +++ b/modules/SliderInput.js @@ -38,7 +38,7 @@ let dragSlider = e=>{ level = Math.min(Math.max(STEPS-input,0),STEPS); - cb("map",level); + if (level != prevLevel) cb("map",level); draw(level); } else if (USE_INCR) { // Heavily inspired by "updown" mode of setUI.