Skip to content

Commit

Permalink
fix(slider): resize ignored highlightrange setting
Browse files Browse the repository at this point in the history
The new highlightRange option was visually ignored whenever the viewport triggered a resize and also the label were redrawn because of autoAdjust:true
  • Loading branch information
lubber-de authored Feb 23, 2025
1 parent 7b5640a commit 08397dc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/definitions/modules/slider.js
Original file line number Diff line number Diff line change
Expand Up @@ -493,7 +493,7 @@
resize: function (_event) {
// To avoid a useless performance cost, we only call the label refresh when its necessary
if (gapRatio !== module.get.gapRatio()) {
module.setup.labels();
module.resync();
gapRatio = module.get.gapRatio();
}
},
Expand All @@ -507,11 +507,11 @@

resync: function () {
module.verbose('Resyncing thumb position based on value');
module.setup.labels();
if (module.is.range()) {
module.update.position(module.secondThumbVal, $secondThumb);
}
module.update.position(module.thumbVal, $thumb);
module.setup.labels();
},
takeStep: function (multiplier) {
if (!multiplier) {
Expand Down

0 comments on commit 08397dc

Please sign in to comment.