From e48eea0f87456258795f136927e15d61c4c32a14 Mon Sep 17 00:00:00 2001 From: Elad Bezalel Date: Wed, 4 Nov 2015 01:03:50 +0200 Subject: [PATCH] fix(ripple): changed ripple center from layerX/Y to offsetX/Y Layer is not considering fixed/absolute positioned elements and it makes the ripple appear from the relative center of the container element, Offset is relative to the target element therefore is more accurate. fixes #4807 and #5508 --- src/core/services/ripple/ripple.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/services/ripple/ripple.js b/src/core/services/ripple/ripple.js index 8d6bf83d944..a4095be6d35 100644 --- a/src/core/services/ripple/ripple.js +++ b/src/core/services/ripple/ripple.js @@ -154,7 +154,7 @@ InkRippleCtrl.prototype.handleMousedown = function (event) { if (this.options.center) { this.createRipple(this.container.prop('clientWidth') / 2, this.container.prop('clientWidth') / 2); } else { - this.createRipple(event.layerX, event.layerY); + this.createRipple(event.offsetX, event.offsetY); } };