Skip to content

How to create a node exactly where mouse pointer is ? #1320

Answered by bcakmakoglu
gitHoussem asked this question in Q&A
Discussion options

You must be logged in to vote

TL;DR:

const { screenToFlowCoordinate } = useVueFlow()

function onSomeEvent(event) {
	const position = screenToFlowCoordinate({
		x: event.clientX,
		y: event.clientY,
	})
}

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@bcakmakoglu
Comment options

Answer selected by gitHoussem
@gitHoussem
Comment options

@AkariMarisa
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants