Commit dbaddf78 authored by Valentin Hervieu's avatar Valentin Hervieu

Merge pull request #223 from angular-slider/no-timeout

perf(initialisation): Remove the timeout call in init.
parents c73e0e79 dfaff47c
/*! angularjs-slider - v2.4.0 - /*! angularjs-slider - v2.4.0 -
(c) Rafal Zajac <rzajac@gmail.com>, Valentin Hervieu <valentin@hervieu.me>, Jussi Saarivirta <jusasi@gmail.com>, Angelin Sirbu <angelin.sirbu@gmail.com> - (c) Rafal Zajac <rzajac@gmail.com>, Valentin Hervieu <valentin@hervieu.me>, Jussi Saarivirta <jusasi@gmail.com>, Angelin Sirbu <angelin.sirbu@gmail.com> -
https://github.com/angular-slider/angularjs-slider - https://github.com/angular-slider/angularjs-slider -
2016-01-13 */ 2016-01-15 */
/*jslint unparam: true */ /*jslint unparam: true */
/*global angular: false, console: false, define, module */ /*global angular: false, console: false, define, module */
(function(root, factory) { (function(root, factory) {
...@@ -292,13 +292,10 @@ ...@@ -292,13 +292,10 @@
this.calcViewDimensions(); this.calcViewDimensions();
this.setMinAndMax(); this.setMinAndMax();
this.addAccessibility(); this.addAccessibility();
this.updateCeilLab();
$timeout(function() { this.updateFloorLab();
self.updateCeilLab(); this.initHandles();
self.updateFloorLab(); this.manageEventsBindings();
self.initHandles();
self.manageEventsBindings();
});
// Recalculate slider view dimensions // Recalculate slider view dimensions
this.scope.$on('reCalcViewDimensions', calcDimFn); this.scope.$on('reCalcViewDimensions', calcDimFn);
......
This diff is collapsed.
...@@ -296,13 +296,10 @@ ...@@ -296,13 +296,10 @@
this.calcViewDimensions(); this.calcViewDimensions();
this.setMinAndMax(); this.setMinAndMax();
this.addAccessibility(); this.addAccessibility();
this.updateCeilLab();
$timeout(function() { this.updateFloorLab();
self.updateCeilLab(); this.initHandles();
self.updateFloorLab(); this.manageEventsBindings();
self.initHandles();
self.manageEventsBindings();
});
// Recalculate slider view dimensions // Recalculate slider view dimensions
this.scope.$on('reCalcViewDimensions', calcDimFn); this.scope.$on('reCalcViewDimensions', calcDimFn);
......
...@@ -61,7 +61,6 @@ describe('rzslider - ', function() { ...@@ -61,7 +61,6 @@ describe('rzslider - ', function() {
angular.element(document).find('body').append(parent); angular.element(document).find('body').append(parent);
scope.$digest(); scope.$digest();
slider = element.isolateScope().slider; slider = element.isolateScope().slider;
$timeout.flush();
} }
/* /*
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment