@@ -705,7 +705,7 @@ MdPanelService.prototype.newPanelPosition = function() {
705
705
* @returns {MdPanelAnimation }
706
706
*/
707
707
MdPanelService . prototype . newPanelAnimation = function ( ) {
708
- return new MdPanelAnimation ( ) ;
708
+ return new MdPanelAnimation ( this . _$injector ) ;
709
709
} ;
710
710
711
711
@@ -749,7 +749,7 @@ function MdPanelRef(config, $injector) {
749
749
/** @private @const {!angular.$mdCompiler} */
750
750
this . _$mdCompiler = $injector . get ( '$mdCompiler' ) ;
751
751
752
- /** @private @const */
752
+ /** @private @const {!angular.$mdConstant} */
753
753
this . _$mdConstant = $injector . get ( '$mdConstant' ) ;
754
754
755
755
/** @private @const {!angular.$mdUtil} */
@@ -1323,7 +1323,7 @@ MdPanelRef.prototype._animateOpen = function() {
1323
1323
done ( ) ;
1324
1324
} ;
1325
1325
1326
- animationConfig . animateOpen ( self . _panelEl , self . _$mdUtil . dom . animator )
1326
+ animationConfig . animateOpen ( self . _panelEl )
1327
1327
. then ( done , warnAndOpen ) ;
1328
1328
} ) ;
1329
1329
} ;
@@ -1354,7 +1354,7 @@ MdPanelRef.prototype._animateClose = function() {
1354
1354
done ( ) ;
1355
1355
} ;
1356
1356
1357
- animationConfig . animateClose ( self . _panelEl , self . _$mdUtil . dom . animator )
1357
+ animationConfig . animateClose ( self . _panelEl )
1358
1358
. then ( done , warnAndClose ) ;
1359
1359
} ) ;
1360
1360
} ;
@@ -1833,9 +1833,13 @@ MdPanelPosition.prototype._calculatePanelPosition = function(panelEl) {
1833
1833
* animation: panelAnimation
1834
1834
* });
1835
1835
*
1836
+ * @param {!angular.$injector } $injector
1836
1837
* @final @constructor
1837
1838
*/
1838
- function MdPanelAnimation ( ) {
1839
+ function MdPanelAnimation ( $injector ) {
1840
+ /** @private @const {!angular.$mdUtil} */
1841
+ this . _$mdUtil = $injector . get ( '$mdUtil' ) ;
1842
+
1839
1843
/**
1840
1844
* @private {{element: !angular.JQLite|undefined, bounds: !DOMRect}|
1841
1845
* undefined}
@@ -1850,9 +1854,6 @@ function MdPanelAnimation() {
1850
1854
1851
1855
/** @private {string|{open: string, close: string} */
1852
1856
this . _animationClass = '' ;
1853
-
1854
- /** @private {!angular.$q.Promise|undefined} **/
1855
- this . _reverseAnimation ;
1856
1857
}
1857
1858
1858
1859
@@ -1947,10 +1948,11 @@ MdPanelAnimation.prototype.withAnimation = function(cssClass) {
1947
1948
/**
1948
1949
* Animate the panel open.
1949
1950
* @param {!angular.JQLite } panelEl
1950
- * @param animator
1951
1951
* @returns {!angular.$q.Promise }
1952
1952
*/
1953
- MdPanelAnimation . prototype . animateOpen = function ( panelEl , animator ) {
1953
+ MdPanelAnimation . prototype . animateOpen = function ( panelEl ) {
1954
+ var animator = this . _$mdUtil . dom . animator ;
1955
+
1954
1956
this . _fixBounds ( panelEl ) ;
1955
1957
var animationOptions = { } ;
1956
1958
@@ -2006,7 +2008,6 @@ MdPanelAnimation.prototype.animateOpen = function(panelEl, animator) {
2006
2008
// panel transform.
2007
2009
}
2008
2010
2009
- var self = this ;
2010
2011
return animator
2011
2012
. translate3d ( panelEl , openFrom , openTo , animationOptions ) ;
2012
2013
} ;
@@ -2015,10 +2016,10 @@ MdPanelAnimation.prototype.animateOpen = function(panelEl, animator) {
2015
2016
/**
2016
2017
* Animate the panel close.
2017
2018
* @param {!angular.JQLite } panelEl
2018
- * @param animator
2019
2019
* @returns {!angular.$q.Promise }
2020
2020
*/
2021
- MdPanelAnimation . prototype . animateClose = function ( panelEl , animator ) {
2021
+ MdPanelAnimation . prototype . animateClose = function ( panelEl ) {
2022
+ var animator = this . _$mdUtil . dom . animator ;
2022
2023
var reverseAnimationOptions = { } ;
2023
2024
2024
2025
// Include the panel transformations when calculating the animations.
@@ -2072,7 +2073,6 @@ MdPanelAnimation.prototype.animateClose = function(panelEl, animator) {
2072
2073
// panel transform.
2073
2074
}
2074
2075
2075
- var self = this ;
2076
2076
return animator
2077
2077
. translate3d ( panelEl , closeFrom , closeTo , reverseAnimationOptions ) ;
2078
2078
} ;
0 commit comments