diff --git a/src/main.ts b/src/main.ts index 30aa9c2..eb6be18 100644 --- a/src/main.ts +++ b/src/main.ts @@ -73,7 +73,7 @@ export default function () { } else if (position === 'top-right' || position === 'center-right' || position === 'bottom-right') { x = b.x + b.width - wCanvas } - if (position === 'center-left' || position === 'center' || position === 'center-right') { + if (position === 'center') { y = b.y + (b.height - hCanvas) / 2 } else if (position === 'bottom-left' || position === 'bottom-center' || position === 'bottom-right') { y = b.y + b.height - hCanvas @@ -95,7 +95,7 @@ export default function () { } else if (position === 'top-right' || position === 'center-right' || position === 'bottom-right') { x = b.x + b.width - wCanvas } - if (position === 'center-left' || position === 'center' || position === 'center-right') { + if (position === 'center') { y = b.y + (b.height - hCanvas) / 2 } else if (position === 'bottom-left' || position === 'bottom-center' || position === 'bottom-right') { y = b.y + b.height - hCanvas