cytoscape.js-edge-editing icon indicating copy to clipboard operation
cytoscape.js-edge-editing copied to clipboard

Option to support fixed angles

Open aguedob opened this issue 6 years ago • 10 comments

It would be awesome to have an option to support fixed angles in connectors while dragging a node dragelaine

aguedob avatar Jul 06 '18 08:07 aguedob

Any update on this feature? It would be great to have this option. 😃

chinicuin avatar Jan 12 '21 21:01 chinicuin

We do not currently have the resources to work on this. Feel free to contribute and do a PR on the unstable branch though. It would be highly appreciated.

ugurdogrusoz avatar Jan 13 '21 04:01 ugurdogrusoz

Sure, I will give it a try in the next couple of weeks and do the corresponding pull request.

chinicuin avatar Jan 13 '21 18:01 chinicuin

https://js.cytoscape.org/#style/taxi-edges There is an edge type called taxi, I hope this helps @aguedob

chinicuin avatar Jan 25 '21 18:01 chinicuin

I actually needs this feature in my project. I will try developing it and merge in. Let me know @ugurdogrusoz if it is already implemented in some way. The feature I plan to achieve is, when mouse dragging a bend anchor point to a location, which is either 0 or 45 or 90 to a anchor point(or source/dest node) before or after the dragging anchor point, it will automatically "stick" to that location.

leoluKL avatar May 17 '21 06:05 leoluKL

No, it hasn't been implemented and I don't believe it's straightforward.

ugurdogrusoz avatar May 17 '21 06:05 ugurdogrusoz

I have completed this feature, I will commit in a short while. I have tested in the demo html. As I do not have a comprehensive understanding of the other code, it might need some additional code to avoid confliction. Please review.

leoluKL avatar May 17 '21 08:05 leoluKL

PR must be to the unstable branch and the new feature needs to be off by default with an option.

ugurdogrusoz avatar May 17 '21 09:05 ugurdogrusoz

Understood. It is strange that the current unstable branch does not work in my laptop after running webpack again (without any change). so I develop and test this feature in master branch. I will PR to unstable still. image

leoluKL avatar May 17 '21 09:05 leoluKL

oops, sorry I misunderstood the original feature request. ..... I am so sorry, i actually implement a feature that will "stick" anchor to some perfect angle when dragging anchor it is different from the original feature request, which asking for more node and keep anchor angle..

Shall I start a new issue and paste this implementation. This feature is what I need in my other project.

leoluKL avatar May 17 '21 09:05 leoluKL