Skip to content

Cytoscape and Ember #21

@xkb

Description

@xkb

@kdbanman, this is a followup of our earlier discussion.

I've managed to get something working with the container method as follows

var cy = Cyto({
  container: this.$()[0],
  style: graphstyle,
  layout: layoutOptions,
  panningEnabled: true,
  userPanningEnabled: true,
  boxSelectionEnabled: true,
});
//then add nodes and edges with
cy.add( {
  nodes: graph.nodes,
  edges: graph.edges
});

I looked into different ways of doing what we want with ember and the ideal/efficient approach would be to initialize cytoscape once on didInsertElement and then use array observes for selected, incoming and outgoing as resources are added/removed, since they're all arrays.

Peeking into the Cytoscape's API, there doesn't seem a way to completely remove nodes/edges from the graph after adding them. There is a remove method but it keeps old objects in memory which isn't ideal.

I don't think re-initializing the entire graph is an option either.

Unsure where to go from here... feels like a dead end. Ideas?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions