0

Basically I'm receiving Cell attributes from a file and I want to replace the corresponding Cells in the graph with the updated attributes but I can't seem to refresh the graph after I've applied the new attributes.

Based on the JointJS docs, it seems like graph.resetCells is what I'm looking for but it doesn't actually do anything when I try it. Any ideas?

Azuzu
  • 11
  • 1
  • 7

1 Answers1

0
paper.render()

paper is the view and graph is the model

Tremmillicious
  • 454
  • 4
  • 14
  • That seems to just turn all the elements invisible and unselectable – Azuzu Feb 08 '21 at 19:14
  • do you have a sample high level code. And also how are you applying the attributes. Are you using .prop or ,attr or .set. Play around with .attr el.attr({ title: { text: card.title }}) and for custom object .set el.set({ city: new City('NYC) }) – Tremmillicious Feb 09 '21 at 00:57
  • I found a way to do it with cell.attributes.attr = foundCell; graph.resetCells(res.res.graph.cells); – Azuzu Feb 10 '21 at 01:01