mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-09-10 19:09:44 +02:00
Fix for issue #150.
This commit is contained in:
@@ -44,7 +44,7 @@ var page = webpage.create()
|
||||
|
||||
|
||||
console.log('options');
|
||||
console.log(options.ganttConfig);
|
||||
console.log(phantom.args.length);
|
||||
|
||||
page.content = [
|
||||
'<html>'
|
||||
@@ -70,6 +70,8 @@ files.forEach(function(file) {
|
||||
, svgContent
|
||||
, allElements
|
||||
|
||||
console.log('Gantconfig: '+options.ganttConfig);
|
||||
|
||||
// this JS is executed in this statement is sandboxed, even though it doesn't
|
||||
// look like it. we need to serialize then unserialize the svgContent that's
|
||||
// taken from the DOM
|
||||
@@ -230,17 +232,18 @@ function executeInPage(data) {
|
||||
}
|
||||
|
||||
if(typeof ganttConfig !== undefined && ganttConfig !== 'undefined'){
|
||||
console.log('Got ganttConfig');
|
||||
sc = document.createElement("script")
|
||||
scContent = document.createTextNode('mermaid.ganttConfig = JSON.parse(' + JSON.stringify(ganttConfig) + ');')
|
||||
sc.appendChild(scContent)
|
||||
|
||||
document.body.appendChild(sc)
|
||||
}else{
|
||||
console.log('No gantt config');
|
||||
console.log('NO gantt config');
|
||||
}
|
||||
|
||||
|
||||
mermaid.init();
|
||||
console.log(document.body.outerHTML);
|
||||
|
||||
svg = document.querySelector('svg')
|
||||
svgValue = xmlSerializer.serializeToString(svg)
|
||||
|
Reference in New Issue
Block a user