From 123a80593fa47cd2abed37f9686288cf1b999916 Mon Sep 17 00:00:00 2001 From: lipinghai1 Date: Mon, 30 Mar 2020 15:18:24 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dplacement=E5=88=A4=E6=96=AD?= =?UTF-8?q?=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/utils/dom.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils/dom.tsx b/src/utils/dom.tsx index 7d5bc8939..f41f12d8b 100644 --- a/src/utils/dom.tsx +++ b/src/utils/dom.tsx @@ -257,7 +257,7 @@ export function calculatePosition( positionLeft += leftDelta; arrowOffsetLeft = 50 * (1 - (2 * leftDelta) / overlayHeight) + '%'; - } else if ((placement = 'center')) { + } else if ((placement === 'center')) { // atX = atY = myX = myY = 'center'; positionLeft = childOffset.left + (childOffset.width - overlayWidth) / 2; positionTop = childOffset.top + (childOffset.height - overlayHeight) / 2;