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

Commit c6103b6

Browse files
committed
fix(speedDial): initialize tranform animations
the speed dial was not properly initializing it's transforms, so the first time it was opened, it would not animate properly. closes #3349
1 parent 312b688 commit c6103b6

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/components/fabSpeedDial/fabSpeedDial.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@
8282
element.prepend('<div class="md-css-variables"></div>');
8383
}
8484

85-
function FabSpeedDialController($scope, $element, $animate) {
85+
function FabSpeedDialController($scope, $element, $animate, $timeout) {
8686
var vm = this;
8787

8888
// Define our open/close functions
@@ -112,6 +112,11 @@
112112
setupListeners();
113113
setupWatchers();
114114

115+
// Fire the animations once in a separate digest loop to initialize them
116+
$timeout(function() {
117+
$animate.addClass($element, 'md-noop');
118+
}, 0);
119+
115120
// Set our default variables
116121
function setupDefaults() {
117122
// Set the default direction to 'down' if none is specified

0 commit comments

Comments
 (0)