mbeynon
mbeynon

Reputation: 253

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

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?

Upvotes: 14

Views: 6081

Answers (2)

Shizan Bhat
Shizan Bhat

Reputation: 31

Use like this.

cy.edges('edge').style({
    "curve-style": "bezier",
    "target-arrow-shape": "triangle"
})

Upvotes: 3

maxkfranz
maxkfranz

Reputation: 12242

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;
}

Upvotes: 41

Related Questions