diff --git a/README.md b/README.md
index 96a24d61..0fb472d3 100644
--- a/README.md
+++ b/README.md
@@ -480,7 +480,10 @@ $('#chartContainerId').orgchart(options);
data | json or string | yes | | datasource usded to build out structure of orgchart. It could be a json object or a string containing the URL to which the ajax request is sent. |
- panzoom | boolean | no | false | Users could pan the orgchart by mouse drag&drop, zoomin/zoomout the orgchart by mouse wheel if they enable this option. |
+ pan | boolean | no | false | Users could pan the orgchart by mouse drag&drop if they enable this option. |
+
+
+ zoom | boolean | no | false | Users could zoomin/zoomout the orgchart by mouse wheel if they enable this option. |
direction | string | no | "t2b" | The available values are t2b(implies "top to bottom", it's default value), b2t(implies "bottom to top"), l2r(implies "left to right"), r2l(implies "right to left"). |
diff --git a/bower.json b/bower.json
index 55c6ff77..a04b0020 100644
--- a/bower.json
+++ b/bower.json
@@ -1,6 +1,6 @@
{
"name": "orgchart",
- "version": "1.0.9.6",
+ "version": "1.0.9.8",
"homepage": "https://github.com/dabeng/OrgChart",
"authors": [
"dabeng "
diff --git a/dist/js/jquery.orgchart.js b/dist/js/jquery.orgchart.js
index fddcb97f..a919e459 100755
--- a/dist/js/jquery.orgchart.js
+++ b/dist/js/jquery.orgchart.js
@@ -38,7 +38,8 @@
'parentNodeSymbol': 'fa-users',
'draggable': false,
'direction': 't2b',
- 'panzoom': false
+ 'pan': false,
+ 'zoom': false
};
switch (options) {
@@ -124,7 +125,7 @@
$chartContainer.append($exportBtn).append(downloadBtn);
}
- if (opts.panzoom) {
+ if (opts.pan) {
$chartContainer.css('overflow', 'hidden');
$chart.on('mousedown',function(e){
var $this = $(this);
@@ -179,6 +180,9 @@
$(this).off('mousemove');
}
});
+ }
+
+ if (opts.zoom) {
$chartContainer.on('wheel', function(event) {
event.preventDefault();
var lastTf = $chart.css('transform');
diff --git a/examples/js/jquery.orgchart.js b/examples/js/jquery.orgchart.js
index fddcb97f..a919e459 100755
--- a/examples/js/jquery.orgchart.js
+++ b/examples/js/jquery.orgchart.js
@@ -38,7 +38,8 @@
'parentNodeSymbol': 'fa-users',
'draggable': false,
'direction': 't2b',
- 'panzoom': false
+ 'pan': false,
+ 'zoom': false
};
switch (options) {
@@ -124,7 +125,7 @@
$chartContainer.append($exportBtn).append(downloadBtn);
}
- if (opts.panzoom) {
+ if (opts.pan) {
$chartContainer.css('overflow', 'hidden');
$chart.on('mousedown',function(e){
var $this = $(this);
@@ -179,6 +180,9 @@
$(this).off('mousemove');
}
});
+ }
+
+ if (opts.zoom) {
$chartContainer.on('wheel', function(event) {
event.preventDefault();
var lastTf = $chart.css('transform');
diff --git a/examples/pan-zoom/scripts.js b/examples/pan-zoom/scripts.js
index c123a9a2..c85e40e0 100644
--- a/examples/pan-zoom/scripts.js
+++ b/examples/pan-zoom/scripts.js
@@ -33,7 +33,8 @@
'data' : datascource,
'depth': 2,
'nodeContent': 'title',
- 'panzoom': true
+ 'pan': true,
+ 'zoom': true
});
});
diff --git a/package.json b/package.json
index b21f6e25..c2f36d49 100755
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "orgchart",
- "version": "1.0.9.6",
+ "version": "1.0.9.8",
"description": "Simple and direct organization chart(tree-like hierarchy) plugin based on pure DOM and jQuery.",
"main": "./dist/js/jquery.orgchart.js",
"style": [