Skip to content

Make the entire node clickable #118

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

Closed
pankajparashar opened this issue Sep 7, 2024 · 3 comments
Closed

Make the entire node clickable #118

pankajparashar opened this issue Sep 7, 2024 · 3 comments
Labels

Comments

@pankajparashar
Copy link

It'll be nice for the entire node to be clickable, instead of just using the Arrow icons to expand/collapse a node. Also it will make it more accessible.

Even if the library doesn't want to support this, Can you guide me how I can implement this using your library?

@pankajparashar pankajparashar added the bug Something isn't working label Sep 7, 2024
@CarlosNZ CarlosNZ added user request Requested by user needs discussion and removed bug Something isn't working labels Sep 7, 2024
@CarlosNZ
Copy link
Owner

CarlosNZ commented Sep 7, 2024

Thanks for the suggestion. It's not a bad idea as the current click zone is possibly a bit small, particularly on mobile devices.

It's fairly simple to add the click handler to the whole div, but making it not respond to the other click zones is a bit trickier, not to mention possible conflicts with drag and drop.

I'll need to have a think about how best to implement it so it doesn't seem confusing if you're not expecting it, but I think we can do something. Perhaps just the whole left margin could be the click zone?

Open to further discussion.

@CarlosNZ
Copy link
Owner

@pankajparashar What do you think of this? I've made a "click-zone" down the whole left margin of the node, as well as made the main header bar click-able for collapse:

2024-09-10 11 40 41

I think this is nicer than making literally the whole node clickable, as it's a bit more intuitive for the user and won't conflict with drag-n-drop and other clickable items (e.g. double-click to edit)

@pankajparashar
Copy link
Author

Yes I think this looks perfect! Massive thanks for adding this feature!

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

No branches or pull requests

2 participants