Skip to content

Commit 4e0d07c

Browse files
committed
Fix floor label being hidden on single slider
1 parent 0fd0156 commit 4e0d07c

File tree

1 file changed

+18
-15
lines changed

1 file changed

+18
-15
lines changed

rzslider.js

Lines changed: 18 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -510,23 +510,26 @@ function throttle(func, wait, options) {
510510
this.showEl(this.ceilLab);
511511
}
512512

513-
if(this.maxLab.rzsl + this.maxLab.rzsw >= this.ceilLab.rzsl - 10)
514-
{
515-
this.hideEl(this.ceilLab);
516-
}
517-
else if( ! clHidden)
513+
if(this.range)
518514
{
519-
this.showEl(this.ceilLab);
520-
}
515+
if(this.maxLab.rzsl + this.maxLab.rzsw >= this.ceilLab.rzsl - 10)
516+
{
517+
this.hideEl(this.ceilLab);
518+
}
519+
else if( ! clHidden)
520+
{
521+
this.showEl(this.ceilLab);
522+
}
521523

522-
// Hide or show floor label
523-
if(this.maxLab.rzsl <= this.flrLab.rzsl + this.flrLab.rzsw + this.handleHalfWidth)
524-
{
525-
this.hideEl(this.flrLab);
526-
}
527-
else if( ! flHidden)
528-
{
529-
this.showEl(this.flrLab);
524+
// Hide or show floor label
525+
if(this.maxLab.rzsl <= this.flrLab.rzsl + this.flrLab.rzsw + this.handleHalfWidth)
526+
{
527+
this.hideEl(this.flrLab);
528+
}
529+
else if( ! flHidden)
530+
{
531+
this.showEl(this.flrLab);
532+
}
530533
}
531534
},
532535

0 commit comments

Comments
 (0)