Problem with graph.fromJSON() #1815
Unanswered
malomiquel
asked this question in
Q&A
Replies: 1 comment
|
JointJS reads cell view definitions from the You can read more about the Following the advice in the article above, you could assign this custom element to the const BusH = joint.dia.Element.define('BusH', {
// attributes
});
Object.assign(joint.shapes, { BusH });
const namespace = joint.shapes;
const graph = new dia.Graph({}, { cellNamespace: namespace });
const paper = new dia.Paper({
cellViewNamespace: namespace
});
graph.fromJSON({
cells: [
{ type: 'BusH'},
]
}); |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Hello everyone,


I have a problem with the function graph.fromJSON() because when i try to import a graph with a json i have an error in my console that say: "Uncaught TypeError: ModelClass is not a constructor".
It's work with basics elements like standard.rectangl but not with my customs elements.
All reactions