Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to create a node at exact cursor position? #903

Open
unordentlich opened this issue Oct 3, 2024 · 1 comment
Open

How to create a node at exact cursor position? #903

unordentlich opened this issue Oct 3, 2024 · 1 comment
Assignees

Comments

@unordentlich
Copy link

Hi!
I want to create nodes in the click event (editor.on('click)) exactly at the position where the cursor is at this moment.

Just using e.x and e.y works fine until I'm moving around with the mouse. Then, new nodes all become an offset and aren't fixed to the cursor anymore.

Is there any event property, which returns the offset-calculated x/y position or how am I able to get it?
Thanks in advance!

@jerosoler jerosoler self-assigned this Oct 4, 2024
@jerosoler
Copy link
Owner

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants