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

Can we have 'unselect node' events? #44

Closed
ghost opened this issue Sep 22, 2020 · 4 comments
Closed

Can we have 'unselect node' events? #44

ghost opened this issue Sep 22, 2020 · 4 comments
Assignees
Labels
enhancement New feature or request

Comments

@ghost
Copy link

ghost commented Sep 22, 2020

So, considering we may want to bind any kind of function to the nodeSelected event, it would be very usefull to have an event to bind functions when the user clicks on any empty space between nodes.

@jerosoler jerosoler self-assigned this Sep 22, 2020
@jerosoler jerosoler added the enhancement New feature or request label Sep 22, 2020
@jerosoler
Copy link
Owner

Hello @douglas-s3nd

oh it would be interesting.

I am looking to add a new event or the nodeSelected event that returns a null value.

@ghost
Copy link
Author

ghost commented Sep 22, 2020

Hmmm...Not sure if a nodeSelected event returning null would be triggered in the same conditions.
I would suggest introducing it along these lines within the click(e) function, precisely after the "switch (this.ele_selected.classList[0])", since it's when the node is actually been unselected

image

At a glance it seems to me it wouldn't imply any collateral damage in other features, but I'm not sure

@jerosoler
Copy link
Owner

A new event has been added so as not to create breaking changes

New version 0.0.25

Added new events:

  • click event
  • keydown event
  • export event
  • nodeUnselected event
  • contextmenu event

Update info, view new events: https://github.com/jerosoler/Drawflow#events

@ghost
Copy link
Author

ghost commented Sep 22, 2020

Nice work man!
Pretty useful 👍

@ghost ghost closed this as completed Sep 22, 2020
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant