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

Increase hitbox of node #1493

Open
hesamzkr opened this issue Dec 7, 2024 · 1 comment
Open

Increase hitbox of node #1493

hesamzkr opened this issue Dec 7, 2024 · 1 comment
Milestone

Comments

@hesamzkr
Copy link

hesamzkr commented Dec 7, 2024

Hello, I want the node to keep the same visual size but have larger hit-box trigger for click. I understand that for this I would need to create a custom renderer but I'm struggling to understand how to write the code for this and I couldn't find much in the docs. I tried replicating the node-circle program class but there was some importing problems and also I'm not sure which property would allow this to happen.

Could you give me the code snippet or throw me in the right direction. I appreciate it a lot.

@jacomyal jacomyal added this to the v4 milestone Dec 12, 2024
@jacomyal
Copy link
Owner

At the moment, there are no easy way to customize nodes or edges hitbox sizes. Since sigma uses picking, the best way for now is for you to implement your own nodes renderer (@sigma/node-square is certainly the easiest example yet), but with the nodes displayed larger on the picking layer.

I'll leave this ticket opened and flag it for v4, though, since I know you are not the first person to meet this need, and it should be handled directly in sigma, through some settings, for instance.

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

No branches or pull requests

2 participants