File tree 3 files changed +18
-14
lines changed
3 files changed +18
-14
lines changed Original file line number Diff line number Diff line change 1283
1283
* @param {number } newOffset new offset value
1284
1284
*/
1285
1285
positionTrackingHandle : function ( newValue , newOffset ) {
1286
+ var valueChanged = false ;
1287
+
1286
1288
if ( this . range ) {
1287
1289
/* This is to check if we need to switch the min and max handles*/
1288
1290
if ( this . tracking === 'rzSliderModel' && newValue >= this . scope . rzSliderHigh ) {
1291
1293
this . tracking = 'rzSliderHigh' ;
1292
1294
this . minH . removeClass ( 'rz-active' ) ;
1293
1295
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 ;
1297
1297
} else if ( this . tracking === 'rzSliderHigh' && newValue <= this . scope . rzSliderModel ) {
1298
1298
this . scope [ this . tracking ] = this . scope . rzSliderModel ;
1299
1299
this . updateHandles ( this . tracking , this . minH . rzsp ) ;
1300
1300
this . tracking = 'rzSliderModel' ;
1301
1301
this . maxH . removeClass ( 'rz-active' ) ;
1302
1302
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 ;
1306
1304
}
1307
1305
}
1308
1306
1309
1307
if ( this . scope [ this . tracking ] !== newValue ) {
1310
1308
this . scope [ this . tracking ] = newValue ;
1311
1309
this . updateHandles ( this . tracking , newOffset ) ;
1310
+ valueChanged = true ;
1311
+ }
1312
+
1313
+ if ( valueChanged ) {
1312
1314
this . scope . $apply ( ) ;
1313
1315
this . callOnChange ( ) ;
1314
1316
}
You can’t perform that action at this time.
0 commit comments