|
604 | 604 | if (this.options.vertical) { |
605 | 605 | this.positionProperty = 'bottom' |
606 | 606 | this.dimensionProperty = 'height' |
| 607 | + } else { |
| 608 | + this.positionProperty = 'left' |
| 609 | + this.dimensionProperty = 'width' |
607 | 610 | } |
608 | 611 |
|
609 | 612 | if (this.options.customTemplateScope) |
|
638 | 641 | * @returns {undefined} |
639 | 642 | */ |
640 | 643 | resetSlider: function() { |
| 644 | + this.resetLabelsValue() |
641 | 645 | this.manageElementsStyle() |
642 | 646 | this.addAccessibility() |
643 | 647 | this.setMinAndMax() |
|
779 | 783 | this.fullBar.addClass('rz-transparent') |
780 | 784 | } |
781 | 785 |
|
782 | | - if (this.options.vertical) this.sliderElem.addClass('rz-vertical') |
| 786 | + if (this.options.vertical) { |
| 787 | + this.sliderElem.addClass('rz-vertical') |
| 788 | + } else { |
| 789 | + this.sliderElem.removeClass('rz-vertical') |
| 790 | + } |
783 | 791 |
|
784 | 792 | if (this.options.draggableRange) this.selBar.addClass('rz-draggable') |
785 | 793 | else this.selBar.removeClass('rz-draggable') |
|
826 | 834 | resetLabelsValue: function() { |
827 | 835 | this.minLab.rzsv = undefined |
828 | 836 | this.maxLab.rzsv = undefined |
| 837 | + this.flrLab.rzsv = undefined |
| 838 | + this.ceilLab.rzsv = undefined |
| 839 | + this.cmbLab.rzsv = undefined |
| 840 | + this.resetPosition(this.flrLab) |
| 841 | + this.resetPosition(this.ceilLab) |
| 842 | + this.resetPosition(this.cmbLab) |
| 843 | + this.resetPosition(this.minLab) |
| 844 | + this.resetPosition(this.maxLab) |
829 | 845 | }, |
830 | 846 |
|
831 | 847 | /** |
|
945 | 961 | ) |
946 | 962 | this.minH.attr('tabindex', '0') |
947 | 963 | else this.minH.attr('tabindex', '') |
948 | | - if (this.options.vertical) |
| 964 | + if (this.options.vertical) { |
949 | 965 | this.minH.attr('aria-orientation', 'vertical') |
| 966 | + } else { |
| 967 | + this.minH.attr('aria-orientation', 'horizontal') |
| 968 | + } |
950 | 969 | if (this.options.ariaLabel) |
951 | 970 | this.minH.attr('aria-label', this.options.ariaLabel) |
952 | 971 | else if (this.options.ariaLabelledBy) |
|
962 | 981 | else this.maxH.attr('tabindex', '') |
963 | 982 | if (this.options.vertical) |
964 | 983 | this.maxH.attr('aria-orientation', 'vertical') |
| 984 | + else this.maxH.attr('aria-orientation', 'horizontal') |
965 | 985 | if (this.options.ariaLabelHigh) |
966 | 986 | this.maxH.attr('aria-label', this.options.ariaLabelHigh) |
967 | 987 | else if (this.options.ariaLabelledByHigh) |
|
1632 | 1652 | return pos |
1633 | 1653 | }, |
1634 | 1654 |
|
| 1655 | + resetPosition: function(elem) { |
| 1656 | + elem.css({ |
| 1657 | + left: null, |
| 1658 | + bottom: null, |
| 1659 | + }) |
| 1660 | + }, |
| 1661 | + |
1635 | 1662 | /** |
1636 | 1663 | * Get element width/height depending on whether slider is horizontal or vertical |
1637 | 1664 | * |
|
0 commit comments