@@ -889,6 +889,7 @@ export class IgxSliderComponent implements
889889 const adjustedValue = this . valueInRange ( value , this . lowerBound , this . upperBound ) ;
890890 if ( this . _lowerValue !== adjustedValue ) {
891891 this . _lowerValue = adjustedValue ;
892+ this . lowerValueChange . emit ( this . _lowerValue ) ;
892893 this . value = { lower : this . _lowerValue , upper : this . _upperValue } ;
893894 }
894895 }
@@ -927,6 +928,7 @@ export class IgxSliderComponent implements
927928 const adjustedValue = this . valueInRange ( value , this . lowerBound , this . upperBound ) ;
928929 if ( this . _upperValue !== adjustedValue ) {
929930 this . _upperValue = adjustedValue ;
931+ this . upperValueChange . emit ( this . _upperValue ) ;
930932 this . value = { lower : this . _lowerValue , upper : this . _upperValue } ;
931933 }
932934 }
@@ -1122,28 +1124,26 @@ export class IgxSliderComponent implements
11221124
11231125 if ( this . isRange ) {
11241126 if ( thumbType === SliderHandle . FROM ) {
1125- const newLower = this . lowerValue + value ;
1126- if ( newLower >= this . lowerBound && newLower <= this . upperValue ) {
1127- this . _lowerValue = newLower ;
1128- this . lowerValueChange . emit ( this . _lowerValue ) ;
1127+ if ( this . lowerValue + value > this . upperValue ) {
1128+ this . upperValue = this . lowerValue + value ;
11291129 }
1130+ this . lowerValue += value ;
11301131 } else {
1131- const newUpper = this . upperValue + value ;
1132- if ( newUpper <= this . upperBound && newUpper >= this . lowerValue ) {
1133- this . _upperValue = newUpper ;
1134- this . upperValueChange . emit ( this . _upperValue ) ;
1132+ if ( this . upperValue + value < this . lowerValue ) {
1133+ this . lowerValue = this . upperValue + value ;
11351134 }
1135+ this . upperValue += value ;
11361136 }
11371137
11381138 const newVal : IRangeSliderValue = {
1139- lower : this . _lowerValue ,
1140- upper : this . _upperValue
1139+ lower : this . lowerValue ,
1140+ upper : this . upperValue
11411141 }
11421142
11431143 // Swap the thumbs if a collision appears.
1144- if ( newVal . lower == newVal . upper ) {
1145- this . toggleThumb ( ) ;
1146- }
1144+ // if (newVal.lower == newVal.upper) {
1145+ // this.toggleThumb();
1146+ // }
11471147
11481148 this . value = newVal ;
11491149
@@ -1235,11 +1235,11 @@ export class IgxSliderComponent implements
12351235 return this . _el . nativeElement . getBoundingClientRect ( ) . width / ( this . maxValue - this . minValue ) * this . step ;
12361236 }
12371237
1238- private toggleThumb ( ) {
1239- return this . thumbFrom . isActive ?
1240- this . thumbTo . nativeElement . focus ( ) :
1241- this . thumbFrom . nativeElement . focus ( ) ;
1242- }
1238+ // private toggleThumb() {
1239+ // return this.thumbFrom.isActive ?
1240+ // this.thumbTo.nativeElement.focus() :
1241+ // this.thumbFrom.nativeElement.focus();
1242+ // }
12431243
12441244 private valueInRange ( value , min = 0 , max = 100 ) {
12451245 return Math . max ( Math . min ( value , max ) , min ) ;
0 commit comments