Skip to content

Commit bf838db

Browse files
author
Valentin Hervieu
committed
Fix combined label position on window resize event.
Hide combined label when show-ticks-value=true.
1 parent 4d13628 commit bf838db

File tree

4 files changed

+19
-9
lines changed

4 files changed

+19
-9
lines changed

dist/rzslider.js

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -473,13 +473,16 @@ function throttle(func, wait, options) {
473473
{
474474
this.updateLowHandle(this.valueToOffset(this.scope.rzSliderModel));
475475

476+
/*
477+
the order here is important since the selection bar should be
478+
updated after the high handle but before the combined label
479+
*/
476480
if(this.range)
477-
{
478481
this.updateHighHandle(this.valueToOffset(this.scope.rzSliderHigh));
482+
this.updateSelectionBar();
483+
if(this.range)
479484
this.updateCmbLabel();
480-
}
481485

482-
this.updateSelectionBar();
483486
this.updateTicksScale();
484487
},
485488

@@ -597,10 +600,12 @@ function throttle(func, wait, options) {
597600
this.ceilLab.rzAlwaysHide = true;
598601
this.minLab.rzAlwaysHide = true;
599602
this.maxLab.rzAlwaysHide = true;
603+
this.cmbLab.rzAlwaysHide = true;
600604
this.hideEl(this.flrLab);
601605
this.hideEl(this.ceilLab);
602606
this.hideEl(this.minLab);
603607
this.hideEl(this.maxLab);
608+
this.hideEl(this.cmbLab);
604609
}
605610

606611
// Remove stuff not needed in single slider

dist/rzslider.min.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/rzslider.min.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/rzslider.js

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -473,13 +473,16 @@ function throttle(func, wait, options) {
473473
{
474474
this.updateLowHandle(this.valueToOffset(this.scope.rzSliderModel));
475475

476+
/*
477+
the order here is important since the selection bar should be
478+
updated after the high handle but before the combined label
479+
*/
476480
if(this.range)
477-
{
478481
this.updateHighHandle(this.valueToOffset(this.scope.rzSliderHigh));
482+
this.updateSelectionBar();
483+
if(this.range)
479484
this.updateCmbLabel();
480-
}
481485

482-
this.updateSelectionBar();
483486
this.updateTicksScale();
484487
},
485488

@@ -597,10 +600,12 @@ function throttle(func, wait, options) {
597600
this.ceilLab.rzAlwaysHide = true;
598601
this.minLab.rzAlwaysHide = true;
599602
this.maxLab.rzAlwaysHide = true;
603+
this.cmbLab.rzAlwaysHide = true;
600604
this.hideEl(this.flrLab);
601605
this.hideEl(this.ceilLab);
602606
this.hideEl(this.minLab);
603607
this.hideEl(this.maxLab);
608+
this.hideEl(this.cmbLab);
604609
}
605610

606611
// Remove stuff not needed in single slider

0 commit comments

Comments
 (0)