@@ -2087,6 +2087,9 @@ function MdPanelPosition($injector) {
2087
2087
/** @private {boolean} */
2088
2088
this . _isRTL = $injector . get ( '$mdUtil' ) . bidi ( ) === 'rtl' ;
2089
2089
2090
+ /** @private @const {!angular.$mdConstant} */
2091
+ this . _$mdConstant = $injector . get ( '$mdConstant' ) ;
2092
+
2090
2093
/** @private {boolean} */
2091
2094
this . _absolute = false ;
2092
2095
@@ -2475,7 +2478,8 @@ MdPanelPosition.prototype._isOnscreen = function(panelEl) {
2475
2478
var top = parseInt ( this . getTop ( ) ) ;
2476
2479
2477
2480
if ( this . _translateX . length || this . _translateY . length ) {
2478
- var offsets = getComputedTranslations ( panelEl ) ;
2481
+ var prefixedTransform = this . _$mdConstant . CSS . TRANSFORM ;
2482
+ var offsets = getComputedTranslations ( panelEl , prefixedTransform ) ;
2479
2483
left += offsets . x ;
2480
2484
top += offsets . y ;
2481
2485
}
@@ -2990,13 +2994,14 @@ function getElement(el) {
2990
2994
/**
2991
2995
* Gets the computed values for an element's translateX and translateY in px.
2992
2996
* @param {!angular.JQLite|!Element } el
2997
+ * @param {string } property
2993
2998
* @return {{x: number, y: number} }
2994
2999
*/
2995
- function getComputedTranslations ( el ) {
3000
+ function getComputedTranslations ( el , property ) {
2996
3001
// The transform being returned by `getComputedStyle` is in the format:
2997
3002
// `matrix(a, b, c, d, translateX, translateY)` if defined and `none`
2998
3003
// if the element doesn't have a transform.
2999
- var transform = getComputedStyle ( el [ 0 ] || el ) . transform ;
3004
+ var transform = getComputedStyle ( el [ 0 ] || el ) [ property ] ;
3000
3005
var openIndex = transform . indexOf ( '(' ) ;
3001
3006
var closeIndex = transform . lastIndexOf ( ')' ) ;
3002
3007
var output = { x : 0 , y : 0 } ;
0 commit comments