From 2901bd1999c9ddb1493ef099b8088371e610ecfb Mon Sep 17 00:00:00 2001 From: Thomas Burleson Date: Tue, 21 Jul 2015 14:59:14 -0500 Subject: [PATCH] update(backdrop): refactor warning message --- src/components/backdrop/backdrop.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/backdrop/backdrop.js b/src/components/backdrop/backdrop.js index 1243a51bb68..631cff59225 100644 --- a/src/components/backdrop/backdrop.js +++ b/src/components/backdrop/backdrop.js @@ -20,6 +20,7 @@ angular .module('material.components.backdrop', ['material.core']) .directive('mdBackdrop', function BackdropDirective($mdTheming, $animate, $rootElement, $window, $log, $$rAF) { + var ERROR_CSS_POSITION = " may not work properly in a scrolled, static-positioned parent container."; return { restrict: 'E', @@ -39,8 +40,7 @@ angular var position = $window.getComputedStyle(parent).getPropertyValue('position'); if (position == 'static') { // backdrop uses position:absolute and will not work properly with parent position:static (default) - var positionError = " may not work properly in a scrolled, static-positioned parent container."; - $log.warn( positionError ); + $log.warn( ERROR_CSS_POSITION ); } }