feat(edges): click handler
This commit is contained in:
@@ -13,6 +13,7 @@ export default (props) => {
|
||||
<path
|
||||
className="react-graph__edge"
|
||||
d={`M ${sourceX},${sourceY}L ${targetX},${targetY}`}
|
||||
onClick={e => console.log('on edge click')}
|
||||
/>
|
||||
);
|
||||
};
|
||||
|
||||
@@ -38,13 +38,18 @@
|
||||
}
|
||||
|
||||
.react-graph__edges {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
pointer-events: none;
|
||||
z-index: 2;
|
||||
}
|
||||
|
||||
.react-graph__edge {
|
||||
fill: none;
|
||||
stroke: #333;
|
||||
stroke-width: 2;
|
||||
pointer-events: all;
|
||||
}
|
||||
|
||||
.react-graph__nodes {
|
||||
|
||||
Reference in New Issue
Block a user