Skip to content
This repository has been archived by the owner on Sep 5, 2024. It is now read-only.

Commit

Permalink
fix(speedDial): initialize tranform animations
Browse files Browse the repository at this point in the history
the speed dial was not properly initializing it's transforms, so
the first time it was opened, it would not animate properly.

closes #3349
  • Loading branch information
topherfangio committed Jul 6, 2015
1 parent 312b688 commit c6103b6
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/components/fabSpeedDial/fabSpeedDial.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@
element.prepend('<div class="md-css-variables"></div>');
}

function FabSpeedDialController($scope, $element, $animate) {
function FabSpeedDialController($scope, $element, $animate, $timeout) {
var vm = this;

// Define our open/close functions
Expand Down Expand Up @@ -112,6 +112,11 @@
setupListeners();
setupWatchers();

// Fire the animations once in a separate digest loop to initialize them
$timeout(function() {
$animate.addClass($element, 'md-noop');
}, 0);

// Set our default variables
function setupDefaults() {
// Set the default direction to 'down' if none is specified
Expand Down

0 comments on commit c6103b6

Please sign in to comment.