From 1c84cc8209873ac2e3f21d51f2721af2941e1ff1 Mon Sep 17 00:00:00 2001 From: Hendrik Huyskens Date: Wed, 10 Apr 2024 10:59:34 +0200 Subject: [PATCH] Change slider callback events to "onFinish" to reduce callbacks due to rapid changing --- digiplan/static/js/sliders.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/digiplan/static/js/sliders.js b/digiplan/static/js/sliders.js index 6114c6b6..640af9a9 100644 --- a/digiplan/static/js/sliders.js +++ b/digiplan/static/js/sliders.js @@ -39,19 +39,19 @@ const pvMapControl = document.getElementsByClassName("map__layers-pv")[0]; // Setup $(".js-slider.js-slider-panel.js-power-mix").ionRangeSlider({ - onChange: function (data) { + onFinish: function (data) { PubSub.publish(eventTopics.POWER_PANEL_SLIDER_CHANGE, data); }, }); $(".js-slider.js-slider-panel").ionRangeSlider({ - onChange: function (data) { + onFinish: function (data) { PubSub.publish(eventTopics.PANEL_SLIDER_CHANGE, data); }, }); $(".js-slider.js-slider-detail-panel").ionRangeSlider({ - onChange: function (data) { + onFinish: function (data) { PubSub.publish(eventTopics.DETAIL_PANEL_SLIDER_CHANGE, data); }, });