Skip to content

Issues with Exporting JointJS Graph to SVG - Unexpected Elements #2730

Answered by kumilingus
VADDIJASWANT asked this question in Q&A
Discussion options

You must be logged in to vote

The element with id 8447566d-4e8b-4bcb-854e-3ec47e90469d is located in the negative coordinate y.

You can test the graph bounding box before calling SVG export. You should see that graph.getBBox() gives you a bbox containing the 2 extra elements at the top.

You're probably just no displaying the contents of the paper with negative coordinates, but they are there (either Paper or PaperScroller configuration).

Ideally, you make sure not to have elements outside viewport. A quick solution is to use the area option of toSVG() and specify the area you want to be exported.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by VADDIJASWANT
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants