From 2433de04818c4db62c3678d58fa53f4ca12f6eea Mon Sep 17 00:00:00 2001 From: dabeng Date: Wed, 22 Jun 2016 22:27:36 +0800 Subject: [PATCH] append noncollapsable className to css file --- README.md | 9 +++++++++ dist/css/jquery.orgchart.css | 4 ++++ examples/css/jquery.orgchart.css | 4 ++++ 3 files changed, 17 insertions(+) diff --git a/README.md b/README.md index ffd2077d..9f03f83e 100644 --- a/README.md +++ b/README.md @@ -589,6 +589,15 @@ This method is designed to get the hierarchy relationships of orgchart for furth +### Tips +- **How can I deactivate expand/collapse feature of orgchart?**(inspired by the [issue](https://github.com/dabeng/OrgChart/issues/25). Thank der-robert and ActiveScottShaw for their constructive discussions:blush) +Users can enable/disable exapand/collapse feature with className "noncollapsable" as shown below. +```js +$('.orgchart').addClass('noncollapsable'); + +$('.orgchart').removeClass('noncollapsable'); +``` + ## Browser Compatibility - Chrome 19+ - Firefox 4+ diff --git a/dist/css/jquery.orgchart.css b/dist/css/jquery.orgchart.css index a3930e22..022e170d 100644 --- a/dist/css/jquery.orgchart.css +++ b/dist/css/jquery.orgchart.css @@ -267,6 +267,10 @@ -webkit-transition: .2s; } +.orgchart.noncollapsable .node .edge { + display: none; +} + .orgchart .edge:hover { color: #449d44; cursor: pointer; diff --git a/examples/css/jquery.orgchart.css b/examples/css/jquery.orgchart.css index a3930e22..022e170d 100644 --- a/examples/css/jquery.orgchart.css +++ b/examples/css/jquery.orgchart.css @@ -267,6 +267,10 @@ -webkit-transition: .2s; } +.orgchart.noncollapsable .node .edge { + display: none; +} + .orgchart .edge:hover { color: #449d44; cursor: pointer;