Skip to content

Can I modify the double-click event in the select tool? #3588

Answered by Taha-Hassan-Git
leey00nsu asked this question in Q&A
Discussion options

You must be logged in to vote

Putting this in your onMount callback should do it. Though typescript will yell at you because it doesn't know this method exists.

onMount={(editor) => {
	editor.setCurrentTool('select')
	const selectTool = editor.getCurrentTool()
	// @ts-ignore
	selectTool.children.idle.handleDoubleClickOnCanvas = () => {
		// do your cool stuff here
		return undefined
	}
}}

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by Taha-Hassan-Git
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