From 590ed7f9619324a37cc40629084e8878be9c4ec4 Mon Sep 17 00:00:00 2001 From: Filod Lin Date: Tue, 25 Nov 2014 19:09:51 +0800 Subject: [PATCH] [Fix] wrong startPos calculation when popup dialog --- src/components/dialog/dialog.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/dialog/dialog.js b/src/components/dialog/dialog.js index 57bd6ab7ba1..aaf98447c9e 100644 --- a/src/components/dialog/dialog.js +++ b/src/components/dialog/dialog.js @@ -418,8 +418,8 @@ function MdDialogProvider($$interimElementProvider) { if (clickElement) { var clickRect = clickElement[0].getBoundingClientRect(); startPos = 'translate3d(' + - (clickRect.left - element[0].offsetWidth) + 'px,' + - (clickRect.top - element[0].offsetHeight) + 'px,' + + (clickRect.left - element[0].offsetWidth / 2) + 'px,' + + (clickRect.top - element[0].offsetHeight / 2) + 'px,' + '0) scale(0.2)'; } else { startPos = 'translate3d(0,100%,0) scale(0.5)';