dash14 / v-network-graph

An interactive network graph visualization component for Vue 3
https://dash14.github.io/v-network-graph/
MIT License
495 stars 44 forks source link

long press event, suggested feature #45

Closed violent-boomerang closed 2 years ago

violent-boomerang commented 2 years ago

Hello, I am using your library on a tablet oriented project, so I rely on touch gestures.

I would like to use a context menu, but on mobile i cannot make a "right click". On mobile often a right click is performed via long press so this would be a possible way for having that. Is there already available something for a context menu on mobile that I am missing?

Thank you and best regards.

dash14 commented 2 years ago

Hi @violent-boomerang, When I was fixing #44, I did a slight update to the event processing. As a result, the node:contextmenu, view:contextmenu events are now fired by the long press operation. This is made possible by the browser's default event handling. It seems that this was unintentionally suppressed until this update. Does this behavior satisfy your requirements?

Best Regards,

violent-boomerang commented 2 years ago

Hello, It satisfies my requirement, though I noticed using the Capture all events example that after node:context has fired also view:context is fired, is this the desired behaviour? Many Thanks

dash14 commented 2 years ago

Thank you for pointing this out! Sorry for repeating. Fixed in v0.5.7

Best Regards,

violent-boomerang commented 2 years ago

Works, thank you very much!