mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-09-12 11:59:39 +02:00
Update phantomscript.js
Computing the display size seems to cause the svg rendering to complete bofore saving the image. Referencing issue #181 https://github.com/knsv/mermaid/issues/181
This commit is contained in:
@@ -256,6 +256,10 @@ function executeInPage(data) {
|
||||
svg = document.querySelector('svg')
|
||||
svgValue = xmlSerializer.serializeToString(svg)
|
||||
|
||||
// make sure the entire view area is calculated before exiting
|
||||
// this solves an issue where the svg is not done rendering when the image is created
|
||||
svg.getBBox();
|
||||
|
||||
//console.log(document.body.outerHTML);
|
||||
|
||||
return svgValue
|
||||
|
Reference in New Issue
Block a user