Skip to content

Commit 1fa70c3

Browse files
authored
chore: adjust the position of floating elements on the x-axis (#105)
1 parent f03feee commit 1fa70c3

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

packages/core/src/Overlay.vue

+3
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,9 @@ export default {
6666
6767
x = Math.max(margin, x)
6868
x = Math.min(x, window.innerWidth - floatsWidth - margin)
69+
if (x < floatsWidth / 2) {
70+
x = floatsWidth / 2 + margin
71+
}
6972
7073
y = Math.max(margin, y)
7174
y = Math.min(y, window.innerHeight - floatsHeight - margin)

0 commit comments

Comments
 (0)