Edge target arrows not working in Cytoscape.js >=2.7.0
Asked Answered
S

2

14

I noticed that edge source or target arrows are missing when using the current unstable branch (2.7.0-unstable). The standard cy demo show below. Is this a known issue or has something changed?

Strickle answered 14/6, 2016 at 21:39 Comment(1)
!(cloud.githubusercontent.com/assets/5722945/16018601/…)Strickle
B
41

The default stylesheet was updated in 2.7 to have greater performance by default. This means that haystack edges are used by default, and haystacks support only mid arrows.

If you set your edges in your stylesheet to beziers, then you can use source and target arrows, e.g.

edge {
  curve-style: bezier;
  target-arrow-shape: triangle;
}
Benediction answered 15/6, 2016 at 19:4 Comment(3)
It works. Thanks a lot. I am currently using Cytoscape.js >=2.7.0 for network virtualization.Codicil
How do you set your edges in your stylesheet to beziers?Mooncalf
style: { 'curve-style': 'bezier', /* ... */ }Jamille
T
2

Use like this.

cy.edges('edge').style({
    "curve-style": "bezier",
    "target-arrow-shape": "triangle"
})
Tarango answered 15/6, 2020 at 4:56 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.