From b7e000b3f5d4501c009f4606033b8d69c7acf493 Mon Sep 17 00:00:00 2001 From: Alexandre Rousseau Date: Sun, 29 Sep 2024 23:20:23 +0200 Subject: [PATCH] refactor layout --- .../components/core/base/BaseInputSlider.vue | 46 ++------------ .../core/base/BaseInputSliderLayout.vue | 56 +++++++++++++++++ .../core/base/BaseInputSliderRange.vue | 61 ++++--------------- .../core/input/CoreSliderRangeInput.vue | 6 +- 4 files changed, 76 insertions(+), 93 deletions(-) create mode 100644 src/ui/src/components/core/base/BaseInputSliderLayout.vue diff --git a/src/ui/src/components/core/base/BaseInputSlider.vue b/src/ui/src/components/core/base/BaseInputSlider.vue index f47d180b3..e02d1ef1d 100644 --- a/src/ui/src/components/core/base/BaseInputSlider.vue +++ b/src/ui/src/components/core/base/BaseInputSlider.vue @@ -1,15 +1,10 @@ - - diff --git a/src/ui/src/components/core/base/BaseInputSliderLayout.vue b/src/ui/src/components/core/base/BaseInputSliderLayout.vue new file mode 100644 index 000000000..5c8d28956 --- /dev/null +++ b/src/ui/src/components/core/base/BaseInputSliderLayout.vue @@ -0,0 +1,56 @@ + + + + + diff --git a/src/ui/src/components/core/base/BaseInputSliderRange.vue b/src/ui/src/components/core/base/BaseInputSliderRange.vue index b099a03ee..ad7a316f0 100644 --- a/src/ui/src/components/core/base/BaseInputSliderRange.vue +++ b/src/ui/src/components/core/base/BaseInputSliderRange.vue @@ -1,14 +1,10 @@ - - diff --git a/src/ui/src/components/core/input/CoreSliderRangeInput.vue b/src/ui/src/components/core/input/CoreSliderRangeInput.vue index 8b28e5dd0..3ebd4db60 100644 --- a/src/ui/src/components/core/input/CoreSliderRangeInput.vue +++ b/src/ui/src/components/core/input/CoreSliderRangeInput.vue @@ -27,9 +27,9 @@ const description = const onChangeHandlerStub = ` def onchange_handler(state, payload): - # Set the state variable "new_val" to the new value - - state["new_val"] = payload`; + # Set the state variables "from" & "to" to the new range + state["from"] = payload[0] + state["to"] = payload[1]`; export default { writer: {