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 -
(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 -
2016-01-13 */
2016-01-15 */
/*jslint unparam: true */
/*global angular: false, console: false, define, module */
(function(root, factory) {
......@@ -292,13 +292,10 @@
this.calcViewDimensions();
this.setMinAndMax();
this.addAccessibility();
$timeout(function() {
self.updateCeilLab();
self.updateFloorLab();
self.initHandles();
self.manageEventsBindings();
});
this.updateCeilLab();
this.updateFloorLab();
this.initHandles();
this.manageEventsBindings();
// Recalculate slider view dimensions
this.scope.$on('reCalcViewDimensions', calcDimFn);
......
This diff is collapsed.
......@@ -296,13 +296,10 @@
this.calcViewDimensions();
this.setMinAndMax();
this.addAccessibility();
$timeout(function() {
self.updateCeilLab();
self.updateFloorLab();
self.initHandles();
self.manageEventsBindings();
});
this.updateCeilLab();
this.updateFloorLab();
this.initHandles();
this.manageEventsBindings();
// Recalculate slider view dimensions
this.scope.$on('reCalcViewDimensions', calcDimFn);
......
......@@ -61,7 +61,6 @@ describe('rzslider - ', function() {
angular.element(document).find('body').append(parent);
scope.$digest();
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