| 
									
										
										
										
											2024-04-08 18:51:46 +08:00
										 |  |  | import { memo } from 'react' | 
					
						
							|  |  |  | import { MiniMap } from 'reactflow' | 
					
						
							| 
									
										
										
										
											2024-06-26 08:37:12 +02: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 08:37:12 +02: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 | 
					
						
							| 
									
										
										
										
											2025-02-08 11:57:41 +08:00
										 |  |  |         pannable | 
					
						
							|  |  |  |         zoomable | 
					
						
							| 
									
										
										
										
											2024-04-08 18:51:46 +08:00
										 |  |  |         style={{ | 
					
						
							| 
									
										
										
										
											2024-05-09 17:18:51 +08:00
										 |  |  |           width: 102, | 
					
						
							|  |  |  |           height: 72, | 
					
						
							| 
									
										
										
										
											2024-04-08 18:51:46 +08:00
										 |  |  |         }} | 
					
						
							| 
									
										
										
										
											2024-12-27 18:10:36 +08:00
										 |  |  |         maskColor='var(--color-workflow-minimap-bg)' | 
					
						
							| 
									
										
										
										
											2025-03-21 17:41:03 +08:00
										 |  |  |         className='!absolute !bottom-14 !left-4 z-[9] !m-0 !h-[72px] !w-[102px] !rounded-lg !border-[0.5px] | 
					
						
							|  |  |  |         !border-divider-subtle !bg-background-default-subtle !shadow-md !shadow-shadow-shadow-5' | 
					
						
							| 
									
										
										
										
											2024-04-08 18:51:46 +08:00
										 |  |  |       /> | 
					
						
							| 
									
										
										
										
											2025-03-21 17:41:03 +08:00
										 |  |  |       <div className='absolute bottom-4 left-4 z-[9] mt-1 flex items-center gap-2'> | 
					
						
							| 
									
										
										
										
											2024-04-08 18:51:46 +08:00
										 |  |  |         <ZoomInOut /> | 
					
						
							| 
									
										
										
										
											2024-06-26 08:37:12 +02: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) |