Closed zeraati closed 11 months ago
Do I understand right that you need to load data from a json file?
json data! I have an API whose output is Jason When the page is loaded with JS, a request is sent to the API It receives the data and the page nodes are loaded based on it
family.load(json)
I think that due to the fact that receiving information from the API is delayed - I think that the load was not done correctly I will check again
I use this code to load data from json
var nodes = JSON.parse(jsonData); if (FamilyTree.events.publish("import", [family, nodes]) != 0) { family._putInUndoStack(); family.clearRedo(); family.config.nodes = nodes; FamilyTree.events.publish("updated", [family]); family.filterUI.update(); family.draw(); }
is it right?