cytoscape / cytoscape.js-cxtmenu

Context menu for Cytoscape.js

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Support for other cytoscape shapes

mecharmor opened this issue · comments

Cytoscape supports a wide range of shapes that the nodes can be. Would it be possible to have different shaped context menu's to better fit the node shape?
For example if the node is of shape "rectangle".

https://js.cytoscape.org/#style/node-body

image

Thanks!

It would be laborious to support all nodes shapes for the spotlight. A selected set of shapes would be tractable -- e.g. circle, rectangle, round-rectangle.

You're welcome to add some new spotlight shapes, as an option, in a PR if you think it would look appropriate to your users.

Keep in mind:

  1. The node may be larger than the maximum spotlight size, and in that case different spotlight shapes won't make much difference.
  2. Non-circle shapes would visually disturb the circular menu shape. Circular menus are less common than vertical ones, and users are even less familiar with circular menus with odd shapes.

I agree it would be a massive undertaking (not to mention bug prone) to support all shapes. having 2-3 shapes would be really nice. i'll take a stab at it if I have time

This issue has been automatically marked as stale, because it has not had activity within the past 14 days. It will be closed if no further activity occurs within the next 7 days. If a feature request is important to you, please consider making a pull request. Thank you for your contributions.