修复placement判断错误

This commit is contained in:
lipinghai1 2020-03-30 15:18:24 +08:00
parent 3056489d87
commit 123a80593f
1 changed files with 1 additions and 1 deletions

View File

@ -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;