@@ -891,6 +891,7 @@ export class IgxSliderComponent implements
891891 const adjustedValue = this . valueInRange ( value , this . lowerBound , this . upperBound ) ;
892892 if ( this . _lowerValue !== adjustedValue ) {
893893 this . _lowerValue = adjustedValue ;
894+ this . lowerValueChange . emit ( this . _lowerValue ) ;
894895 this . value = { lower : this . _lowerValue , upper : this . _upperValue } ;
895896 }
896897 }
@@ -929,6 +930,7 @@ export class IgxSliderComponent implements
929930 const adjustedValue = this . valueInRange ( value , this . lowerBound , this . upperBound ) ;
930931 if ( this . _upperValue !== adjustedValue ) {
931932 this . _upperValue = adjustedValue ;
933+ this . upperValueChange . emit ( this . _upperValue ) ;
932934 this . value = { lower : this . _lowerValue , upper : this . _upperValue } ;
933935 }
934936 }
@@ -1124,28 +1126,26 @@ export class IgxSliderComponent implements
11241126
11251127 if ( this . isRange ) {
11261128 if ( thumbType === SliderHandle . FROM ) {
1127- const newLower = this . lowerValue + value ;
1128- if ( newLower >= this . lowerBound && newLower <= this . upperValue ) {
1129- this . _lowerValue = newLower ;
1130- this . lowerValueChange . emit ( this . _lowerValue ) ;
1129+ if ( this . lowerValue + value > this . upperValue ) {
1130+ this . upperValue = this . lowerValue + value ;
11311131 }
1132+ this . lowerValue += value ;
11321133 } else {
1133- const newUpper = this . upperValue + value ;
1134- if ( newUpper <= this . upperBound && newUpper >= this . lowerValue ) {
1135- this . _upperValue = newUpper ;
1136- this . upperValueChange . emit ( this . _upperValue ) ;
1134+ if ( this . upperValue + value < this . lowerValue ) {
1135+ this . lowerValue = this . upperValue + value ;
11371136 }
1137+ this . upperValue += value ;
11381138 }
11391139
11401140 const newVal : IRangeSliderValue = {
1141- lower : this . _lowerValue ,
1142- upper : this . _upperValue
1141+ lower : this . lowerValue ,
1142+ upper : this . upperValue
11431143 }
11441144
11451145 // Swap the thumbs if a collision appears.
1146- if ( newVal . lower == newVal . upper ) {
1147- this . toggleThumb ( ) ;
1148- }
1146+ // if (newVal.lower == newVal.upper) {
1147+ // this.toggleThumb();
1148+ // }
11491149
11501150 this . value = newVal ;
11511151
@@ -1237,11 +1237,11 @@ export class IgxSliderComponent implements
12371237 return this . _el . nativeElement . getBoundingClientRect ( ) . width / ( this . maxValue - this . minValue ) * this . step ;
12381238 }
12391239
1240- private toggleThumb ( ) {
1241- return this . thumbFrom . isActive ?
1242- this . thumbTo . nativeElement . focus ( ) :
1243- this . thumbFrom . nativeElement . focus ( ) ;
1244- }
1240+ // private toggleThumb() {
1241+ // return this.thumbFrom.isActive ?
1242+ // this.thumbTo.nativeElement.focus() :
1243+ // this.thumbFrom.nativeElement.focus();
1244+ // }
12451245
12461246 private valueInRange ( value , min = 0 , max = 100 ) {
12471247 return Math . max ( Math . min ( value , max ) , min ) ;
0 commit comments