2024-04-08 18:51:46 +08:00
|
|
|
import { memo } from 'react'
|
|
|
|
import { MiniMap } from 'reactflow'
|
2024-06-26 14:37:12 +08:00
|
|
|
import UndoRedo from '../header/undo-redo'
|
2024-04-08 18:51:46 +08:00
|
|
|
import ZoomInOut from './zoom-in-out'
|
2024-05-09 17:18:51 +08:00
|
|
|
import Control from './control'
|
2024-04-08 18:51:46 +08:00
|
|
|
|
2024-06-26 14:37:12 +08:00
|
|
|
export type OperatorProps = {
|
|
|
|
handleUndo: () => void
|
|
|
|
handleRedo: () => void
|
|
|
|
}
|
|
|
|
|
|
|
|
const Operator = ({ handleUndo, handleRedo }: OperatorProps) => {
|
2024-04-08 18:51:46 +08:00
|
|
|
return (
|
2024-05-09 17:18:51 +08:00
|
|
|
<>
|
2024-04-08 18:51:46 +08:00
|
|
|
<MiniMap
|
|
|
|
style={{
|
2024-05-09 17:18:51 +08:00
|
|
|
width: 102,
|
|
|
|
height: 72,
|
2024-04-08 18:51:46 +08:00
|
|
|
}}
|
2024-06-05 00:13:29 +08:00
|
|
|
className='!absolute !left-4 !bottom-14 z-[9] !m-0 !w-[102px] !h-[72px] !border-[0.5px] !border-black/8 !rounded-lg !shadow-lg'
|
2024-04-08 18:51:46 +08:00
|
|
|
/>
|
2024-05-09 17:18:51 +08:00
|
|
|
<div className='flex items-center mt-1 gap-2 absolute left-4 bottom-4 z-[9]'>
|
2024-04-08 18:51:46 +08:00
|
|
|
<ZoomInOut />
|
2024-06-26 14:37:12 +08:00
|
|
|
<UndoRedo handleUndo={handleUndo} handleRedo={handleRedo} />
|
2024-05-09 17:18:51 +08:00
|
|
|
<Control />
|
2024-04-08 18:51:46 +08:00
|
|
|
</div>
|
2024-05-09 17:18:51 +08:00
|
|
|
</>
|
2024-04-08 18:51:46 +08:00
|
|
|
)
|
|
|
|
}
|
|
|
|
|
|
|
|
export default memo(Operator)
|