Skip to content

Commit

Permalink
frontend: Remove reliance on jQuery for Bootstrap slider
Browse files Browse the repository at this point in the history
  • Loading branch information
rht committed Jun 7, 2022
1 parent aa12af2 commit ef653fa
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions mesa/visualization/templates/js/runcontrol.js
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,7 @@ const fpsControl = new Slider("#fps", {
ticks_labels: [0, 20],
ticks_position: [0, 100],
});
document.getElementById("fps").onchange = () =>
controller.updateFPS(fpsControl.getValue());
fpsControl.on("change", () => controller.updateFPS(fpsControl.getValue()));

/*
* Button logic for start, stop and reset buttons
Expand Down Expand Up @@ -264,9 +263,9 @@ const initGUI = function (model_params) {
ticks_labels: [obj.min_value, obj.max_value],
ticks_positions: [0, 100],
});
document.getElementById(domID).onchange = () => {
sliderInput.on("change", () => {
onSubmitCallback(param, Number(sliderInput.getValue()));
};
});
};

const addChoiceInput = function (param, obj) {
Expand Down

0 comments on commit ef653fa

Please sign in to comment.