mirror of
https://github.com/arc53/DocsGPT.git
synced 2025-11-29 00:23:17 +00:00
(fix:menu) left and right
This commit is contained in:
@@ -82,14 +82,14 @@ export default function ContextMenu({
|
|||||||
// Adjust position based on specified position
|
// Adjust position based on specified position
|
||||||
switch (position) {
|
switch (position) {
|
||||||
case 'bottom-left':
|
case 'bottom-left':
|
||||||
left = rect.left + scrollX - offset.x;
|
left = rect.right + scrollX - menuWidth + offset.x;
|
||||||
break;
|
break;
|
||||||
case 'top-right':
|
case 'top-right':
|
||||||
top = rect.top + scrollY - offset.y - menuHeight;
|
top = rect.top + scrollY - offset.y - menuHeight;
|
||||||
break;
|
break;
|
||||||
case 'top-left':
|
case 'top-left':
|
||||||
top = rect.top + scrollY - offset.y - menuHeight;
|
top = rect.top + scrollY - offset.y - menuHeight;
|
||||||
left = rect.left + scrollX - offset.x;
|
left = rect.right + scrollX - menuWidth + offset.x;
|
||||||
break;
|
break;
|
||||||
// bottom-right is default
|
// bottom-right is default
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user