mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-01-28 07:03:17 +08: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:
parent
6f96b5dd14
commit
af0d40e907
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user