From 95c30ca0733ef8ab0462c6604608f65f52f51cef Mon Sep 17 00:00:00 2001 From: dongxbin Date: Wed, 9 Oct 2019 11:27:54 +0800 Subject: [PATCH] udpate demo folder --- .gitignore | 3 ++- demo/css/style.css | 26 ++++++++++++++++++++++++++ package.json | 2 +- src/js/jquery.orgchart.js | 4 ++-- 4 files changed, 31 insertions(+), 4 deletions(-) create mode 100755 demo/css/style.css diff --git a/.gitignore b/.gitignore index 59909af5..11f555a0 100644 --- a/.gitignore +++ b/.gitignore @@ -1,7 +1,8 @@ # compiled output /dist /demo/js -/demo/css +/demo/css/font-awesome.min.css +/demo/css/jquery.orgchart.css /demo/fonts # Coverage directory used by tools like istanbul diff --git a/demo/css/style.css b/demo/css/style.css new file mode 100755 index 00000000..b8f3c93d --- /dev/null +++ b/demo/css/style.css @@ -0,0 +1,26 @@ +html,body { + width: 100%; + height: 100%; + margin: 0; + padding: 0; +} + +body { + font-family: Arial; + font-size: 14px; + line-height: 1.428571429; + color: #333333; +} + +#chart-container { + position: relative; + display: inline-block; + top: 10px; + left: 10px; + height: 420px; + width: calc(100% - 24px); + border: 2px dashed #aaa; + border-radius: 5px; + overflow: auto; + text-align: center; +} \ No newline at end of file diff --git a/package.json b/package.json index 38353cf1..49eb2862 100755 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "orgchart", - "version": "2.1.7", + "version": "2.1.8", "description": "Simple and direct organization chart(tree-like hierarchy) plugin based on pure DOM and jQuery.", "main": "./dist/js/jquery.orgchart.min.js", "style": [ diff --git a/src/js/jquery.orgchart.js b/src/js/jquery.orgchart.js index 3f6aec50..3a572dc9 100644 --- a/src/js/jquery.orgchart.js +++ b/src/js/jquery.orgchart.js @@ -1361,13 +1361,13 @@ if (docWidth > docHeight) { doc = new jsPDF({ orientation: 'landscape', - unit: 'mm', + unit: 'px', format: [docWidth, docHeight] }); } else { doc = new jsPDF({ orientation: 'portrait', - unit: 'mm', + unit: 'px', format: [docHeight, docWidth] }); }