File tree Expand file tree Collapse file tree 3 files changed +18
-14
lines changed
Expand file tree Collapse file tree 3 files changed +18
-14
lines changed Original file line number Diff line number Diff line change 12831283 * @param {number } newOffset new offset value
12841284 */
12851285 positionTrackingHandle : function ( newValue , newOffset ) {
1286+ var valueChanged = false ;
1287+
12861288 if ( this . range ) {
12871289 /* This is to check if we need to switch the min and max handles*/
12881290 if ( this . tracking === 'rzSliderModel' && newValue >= this . scope . rzSliderHigh ) {
12911293 this . tracking = 'rzSliderHigh' ;
12921294 this . minH . removeClass ( 'rz-active' ) ;
12931295 this . maxH . addClass ( 'rz-active' ) ;
1294- /* We need to apply here because we are not sure that we will enter the next block */
1295- this . scope . $apply ( ) ;
1296- this . callOnChange ( ) ;
1296+ valueChanged = true ;
12971297 } else if ( this . tracking === 'rzSliderHigh' && newValue <= this . scope . rzSliderModel ) {
12981298 this . scope [ this . tracking ] = this . scope . rzSliderModel ;
12991299 this . updateHandles ( this . tracking , this . minH . rzsp ) ;
13001300 this . tracking = 'rzSliderModel' ;
13011301 this . maxH . removeClass ( 'rz-active' ) ;
13021302 this . minH . addClass ( 'rz-active' ) ;
1303- /* We need to apply here because we are not sure that we will enter the next block */
1304- this . scope . $apply ( ) ;
1305- this . callOnChange ( ) ;
1303+ valueChanged = true ;
13061304 }
13071305 }
13081306
13091307 if ( this . scope [ this . tracking ] !== newValue ) {
13101308 this . scope [ this . tracking ] = newValue ;
13111309 this . updateHandles ( this . tracking , newOffset ) ;
1310+ valueChanged = true ;
1311+ }
1312+
1313+ if ( valueChanged ) {
13121314 this . scope . $apply ( ) ;
13131315 this . callOnChange ( ) ;
13141316 }
You can’t perform that action at this time.
0 commit comments