diff --git a/frontend/src/components/CustomNode.jsx b/frontend/src/components/CustomNode.jsx index c500180..45f3830 100644 --- a/frontend/src/components/CustomNode.jsx +++ b/frontend/src/components/CustomNode.jsx @@ -3,35 +3,61 @@ import { Handle, Position } from 'reactflow'; function CustomNode({ data }) { const icon = data.icon || 'https://s3.dvirlabs.com/lab-icons/default.svg'; + const handleSize = 5; + + const visibleHandleStyle = { + background: '#1976d2', + width: handleSize, + height: handleSize, + borderRadius: '50%', + zIndex: 2, + }; + + const invisibleHandleStyle = { + background: 'transparent', + width: handleSize, + height: handleSize, + borderRadius: '50%', + zIndex: 1, + }; + return (
- {/* Handles - חובה */} - - - - + {/* === TOP === */} + + - {/* Icon and label */} + {/* === BOTTOM === */} + + + {/* === LEFT === */} + + + + {/* === RIGHT === */} + + + + {/* === ICON + LABEL === */} {data.label} { e.target.src = 'https://s3.dvirlabs.com/lab-icons/default.svg'; }} - style={{ width: 40, height: 40, marginBottom: 6 }} + style={{ width: 40, height: 40, marginTop: 6 }} /> -
{data.label}
+
{data.label}
); }