Skip to content

Get current zoom level reactive number #1632

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

You must be logged in to vote

Instead of getViewport you can just use

const { viewport } = useVueFlow()

watch(() => viewport.value.zoom, (nextZoom) => {
	console.log(nextZoom)
})

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@gitHoussem
Comment options

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