mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-04-18 23:09:47 +02:00
Switch to menu right more easily
This commit is contained in:
@@ -436,7 +436,7 @@ const Menu = forwardRef<Omit<DropdownRef, 'open' | 'isOpen' | 'toggle' | 'items'
|
|||||||
const heightBelow = docRect.height - triggerShape.bottom;
|
const heightBelow = docRect.height - triggerShape.bottom;
|
||||||
const horizontalSpaceRemaining = docRect.width - triggerShape.left;
|
const horizontalSpaceRemaining = docRect.width - triggerShape.left;
|
||||||
const top = triggerShape.bottom;
|
const top = triggerShape.bottom;
|
||||||
const onRight = horizontalSpaceRemaining < 200;
|
const onRight = horizontalSpaceRemaining < 300;
|
||||||
const upsideDown = heightBelow < heightAbove && heightBelow < items.length * 25 + 20 + 200;
|
const upsideDown = heightBelow < heightAbove && heightBelow < items.length * 25 + 20 + 200;
|
||||||
const triggerWidth = triggerShape.right - triggerShape.left;
|
const triggerWidth = triggerShape.right - triggerShape.left;
|
||||||
return {
|
return {
|
||||||
|
|||||||
Reference in New Issue
Block a user