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

NodeWrapper events (onMouseEnter, onMouseMove, onMouseLeave) not being emitted #253

Closed
jayrchamp opened this issue Jul 29, 2022 · 2 comments · Fixed by #254
Closed

NodeWrapper events (onMouseEnter, onMouseMove, onMouseLeave) not being emitted #253

jayrchamp opened this issue Jul 29, 2022 · 2 comments · Fixed by #254
Assignees
Labels
bug Something isn't working

Comments

@jayrchamp
Copy link
Contributor

NodeWrapper events (onMouseEnter, onMouseMove, onMouseLeave) not being emitted

In the file NodeWrapper.vue, it seems like the following methods: onMouseEnter, onMouseMove and onMouseLeave will never be able to trigger the event since "dragging" is a ref object and will always result to be true.

It should be changed to "dragging.value" so that it is correctly evaluated.

Example:

const onMouseEnter = (event: MouseEvent) => {
  if (!dragging.value) {
    emit.mouseEnter({ event, node, connectedEdges: getConnectedEdges([node], edges) })
  }
}

Thank you

@bcakmakoglu
Copy link
Owner

Nice catch, thanks.
Ill merge the PR and release the fix during the day 👍

@bcakmakoglu bcakmakoglu self-assigned this Jul 29, 2022
@bcakmakoglu bcakmakoglu added the bug Something isn't working label Jul 29, 2022
jayrchamp added a commit to jayrchamp/vue-flow that referenced this issue Jul 29, 2022
bcakmakoglu pushed a commit that referenced this issue Jul 29, 2022
bcakmakoglu pushed a commit that referenced this issue Jul 30, 2022
@bcakmakoglu
Copy link
Owner

bcakmakoglu commented Jul 30, 2022

@jayrchamp fix released with 0.4.33

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants