feat(edges): click handler

This commit is contained in:
moklick
2019-07-24 17:47:09 +02:00
parent d3929c19a6
commit 6312f6bd1e
2 changed files with 6 additions and 0 deletions
+1
View File
@@ -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')}
/>
);
};
+5
View File
@@ -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 {