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

Commit be2fdcb

Browse files
style(ripple): renamed variable to accurately represent its contents
1 parent 44e3631 commit be2fdcb

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

src/core/services/ripple/ripple.js

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -90,23 +90,22 @@ function InkRippleService($window, $timeout) {
9090
var containerWidth = rippleContainer.prop('offsetWidth'),
9191
containerHeight = rippleContainer.prop('offsetHeight'),
9292
multiplier = element.hasClass('md-fab') ? 1.1 : 0.8,
93-
diagonalWidth = Math.max(containerWidth, containerHeight) * multiplier;
93+
rippleWidth = Math.max(containerWidth, containerHeight) * multiplier;
9494

9595
if (contentParent) {
9696
top += contentParent.$element.prop('scrollTop');
9797
}
9898

9999
var css = {
100100
backgroundColor: $window.getComputedStyle(rippleEl[0]).color || $window.getComputedStyle(node).color,
101-
width: diagonalWidth + 'px',
102-
height: diagonalWidth + 'px',
103-
marginLeft: (diagonalWidth * -0.5) + 'px',
104-
marginTop: (diagonalWidth * -0.5) + 'px'
101+
width: rippleWidth + 'px',
102+
height: rippleWidth + 'px',
103+
marginLeft: (rippleWidth * -0.5) + 'px',
104+
marginTop: (rippleWidth * -0.5) + 'px'
105105
};
106106

107107
if (options.center) {
108-
css.left = '50%';
109-
css.top = '50%';
108+
css.left = css.top = '50%';
110109
} else if (positionsAreAbsolute) {
111110
var elementRect = node.getBoundingClientRect();
112111
left -= elementRect.left;

0 commit comments

Comments
 (0)