wrong link ends position after rendring from json (graph.fromJSON)
See original GitHub issueHello,
I draw the diagram below:
I export the diagram using graph.toJSON()
then I import it using graph.fromJSON()
, the diagram was rendered as below:
The link ends was changed. This is my paper config:
const paper = new joint.dia.Paper({
el: $('#paper', el),
width: PAPER.WIDTH,
height: PAPER.HEIGHT,
gridSize: 1,
model: graph,
cellViewNamespace: joint.shapes,
drawGrid: true,
interactive: true,
linkPinning: false,
defaultRouter: {
name: 'manhattan',
args: {
perpendicular: true,
step: 20
}
}
});
Could anyone please help me out here ? Thanks.
Issue Analytics
- State:
- Created 4 years ago
- Comments:13 (6 by maintainers)
Top Results From Across the Web
Custom Links are not drawn on paper after redo or graph ...
Hello, I have a problem with my custom link regarding the recreation of it ... fromJSON(treeGraphJSON ) the links are visually missing.
Read more >links not working as required when used with reparenting
I am not sure what is wrong and I am still new to joint js. Code: window.onload = function () { var graph...
Read more >problem with fromJSON - Google Groups
I have encountered the following problem with using graph.fromJSON function. I think I am using the functions correctly according to whats described here:....
Read more >Data From JSON | Working with Data - AnyChart Documentation
AnyChart js charting library supports several ways of setting data. This article quickly demonstrates main aspects of using JSON format in AnyChart component....
Read more >JavaScript JSON Date Parsing and real Dates - Rick Strahl
JavaScript doesn't have a date literal, and for this reason JSON serializes dates as strings rather than real JavaScript dates.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@kumilingus thank you very much it works
It’s probably because the paper is not in the DOM when it starts to render elements and links. Try to freeze the paper at initialization and unfreeze it when you are sure the paper is in the DOM.