mirror of
https://github.com/tiennm99/DocsGPT.git
synced 2026-10-12 20:15:26 +00:00
(fix:menu) left and right
This commit is contained in:
1 parent
a61e44d175
commit
8b4f6553f3
1 file changed
+2
-2
@@ -82,14 +82,14 @@ export default function ContextMenu({
|
||||
// Adjust position based on specified position
|
||||
switch (position) {
|
||||
case 'bottom-left':
|
||||
left = rect.left + scrollX - offset.x;
|
||||
left = rect.right + scrollX - menuWidth + offset.x;
|
||||
break;
|
||||
case 'top-right':
|
||||
top = rect.top + scrollY - offset.y - menuHeight;
|
||||
break;
|
||||
case 'top-left':
|
||||
top = rect.top + scrollY - offset.y - menuHeight;
|
||||
left = rect.left + scrollX - offset.x;
|
||||
left = rect.right + scrollX - menuWidth + offset.x;
|
||||
break;
|
||||
// bottom-right is default
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user