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