Merge pull request #433 from whyzdev/issue428_fix_gantt_cli_cfg

fix gantt chart cli configuration broken
This commit is contained in:
Knut Sveidqvist 2016-12-13 09:28:37 +01:00 committed by GitHub
commit 66d7c00e84
1 changed files with 3 additions and 4 deletions

View File

@ -40,13 +40,12 @@ var options = {
, png: system.args[2] === 'true' ? true : false
, svg: system.args[3] === 'true' ? true : false
, css: fs.read(system.args[4])
, sequenceConfig: system.args[5] !== 'null' ? JSON.parse(fs.read(system.args[5])) : '{}'
, ganttConfig: system.args[6] !== 'null' ? JSON.parse(fs.read(system.args[6])) : '{}'
, sequenceConfig: system.args[5] !== 'null' ? JSON.parse(fs.read(system.args[5])) : {}
, ganttConfig: system.args[6] !== 'null' ? JSON.parse(fs.read(system.args[6])) : {}
, verbose: system.args[7] === 'true' ? true : false
, width: width
}
, log = logger(options.verbose)
options.sequenceConfig.useMaxWidth = false;
page.content = [
@ -212,7 +211,7 @@ function executeInPage(data) {
var xmlSerializer = new XMLSerializer()
, contents = data.contents
, sequenceConfig = JSON.stringify(data.sequenceConfig)
, ganttConfig = data.ganttConfig
, ganttConfig = JSON.stringify(data.ganttConfig).replace(/"(function.*)}"/, "$1")
, toRemove
, el
, elContent