feat(nodes): pass pos to click handler

This commit is contained in:
moklick
2019-07-16 12:15:30 +02:00
parent 4fc7df1aa6
commit e40ae6d841
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -47,7 +47,7 @@ export default NodeComponent => (props) => {
className="react-graph__nodewrap"
ref={nodeElement}
style={{ transform: `translate(${position.x}px,${position.y}px)` }}
onClick={() => onNodeClick(data)}
onClick={() => onNodeClick({ data, position })}
>
<NodeComponent {...props} />
</div>