cytoscape / cytoscape.js

Graph theory (network) library for visualisation and analysis
https://js.cytoscape.org
MIT License
10.09k stars 1.64k forks source link

Can't get `nodes.parents()` to work #2035

Closed subhc closed 6 years ago

subhc commented 6 years ago

Issue type

Bug report

Environment info

Current (buggy) behaviour

Ancestor list is always empty for nodes.parents(). I am not sure if I am using the method correctly.

Desired behaviour

It should return the ancestors of a node.

Minimum steps to reproduce

  1. Open http://js.cytoscape.org/demos/dagre-layout/
  2. In inspect window (F12), type cy.nodes('#n15').parents() in its console

It should return 3 nodes but returns a zero length object.

maxkfranz commented 6 years ago

Not a bug.

Read the docs, please: