B: Fix contextMenu overflow
This commit is contained in:
parent
e2e864d18b
commit
bec8bba67f
|
@ -101,8 +101,12 @@ function NodeContextMenu({
|
||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div ref={ref} className='absolute select-none' style={{ top: cursorY, left: cursorX, width: 10, height: 10 }}>
|
<div ref={ref} className='absolute select-none' style={{ top: cursorY, left: cursorX }}>
|
||||||
<Dropdown isOpen={isOpen} stretchLeft={cursorX >= window.innerWidth - PARAMETER.ossContextMenuWidth}>
|
<Dropdown
|
||||||
|
isOpen={isOpen}
|
||||||
|
stretchLeft={cursorX >= window.innerWidth - PARAMETER.ossContextMenuWidth}
|
||||||
|
stretchTop={cursorY >= window.innerHeight - PARAMETER.ossContextMenuHeight}
|
||||||
|
>
|
||||||
<DropdownButton
|
<DropdownButton
|
||||||
text='Редактировать'
|
text='Редактировать'
|
||||||
title='Редактировать операцию'
|
title='Редактировать операцию'
|
||||||
|
|
|
@ -15,6 +15,7 @@ export const PARAMETER = {
|
||||||
ossImageWidth: 1280, // pixels - size of OSS image
|
ossImageWidth: 1280, // pixels - size of OSS image
|
||||||
ossImageHeight: 960, // pixels - size of OSS image
|
ossImageHeight: 960, // pixels - size of OSS image
|
||||||
ossContextMenuWidth: 200, // pixels - width of OSS context menu
|
ossContextMenuWidth: 200, // pixels - width of OSS context menu
|
||||||
|
ossContextMenuHeight: 200, // pixels - height of OSS context menu
|
||||||
ossGridSize: 10, // pixels - size of OSS grid
|
ossGridSize: 10, // pixels - size of OSS grid
|
||||||
ossMinDistance: 20, // pixels - minimum distance between node centers
|
ossMinDistance: 20, // pixels - minimum distance between node centers
|
||||||
ossDistanceX: 180, // pixels - insert x-distance between node centers
|
ossDistanceX: 180, // pixels - insert x-distance between node centers
|
||||||
|
|
Loading…
Reference in New Issue
Block a user