Merge pull request #3478 from wbkd/react-flow-use-react-flow
useReactFlow improvements
This commit is contained in:
@@ -49,9 +49,9 @@ const DnDFlow = () => {
|
||||
|
||||
if (reactFlowInstance) {
|
||||
const type = event.dataTransfer.getData('application/reactflow');
|
||||
const position = reactFlowInstance.project({
|
||||
const position = reactFlowInstance.screenToFlowCoordinate({
|
||||
x: event.clientX,
|
||||
y: event.clientY - 40,
|
||||
y: event.clientY,
|
||||
});
|
||||
const newNode: Node = {
|
||||
id: getId(),
|
||||
|
||||
Reference in New Issue
Block a user