collapsing parts of the tree doesn't make sibling trees move
commit
fb6808bd07
|
@ -1,20 +1,18 @@
|
|||
/**
|
||||
* jQuery org-chart/tree plugin.
|
||||
*
|
||||
* Author: Wes Nolte
|
||||
* http://twitter.com/wesnolte
|
||||
*
|
||||
* Based on the work of Mark Lee
|
||||
* http://www.capricasoftware.co.uk
|
||||
*
|
||||
* ID implementation fixed by Adrian Hinz
|
||||
*
|
||||
* This software is licensed under the Creative Commons Attribution-ShareAlike
|
||||
* 3.0 License.
|
||||
*
|
||||
* See here for license terms:
|
||||
* http://creativecommons.org/licenses/by-sa/3.0
|
||||
*/
|
||||
* jQuery org-chart/tree plugin.
|
||||
*
|
||||
* Author: Wes Nolte
|
||||
* http://twitter.com/wesnolte
|
||||
*
|
||||
* Based on the work of Mark Lee
|
||||
* http://www.capricasoftware.co.uk
|
||||
*
|
||||
* This software is licensed under the Creative Commons Attribution-ShareAlike
|
||||
* 3.0 License.
|
||||
*
|
||||
* See here for license terms:
|
||||
* http://creativecommons.org/licenses/by-sa/3.0
|
||||
*/
|
||||
(function($) {
|
||||
|
||||
$.fn.jOrgChart = function(options) {
|
||||
|
@ -182,16 +180,15 @@
|
|||
$nodeDiv.click(function() {
|
||||
var $this = $(this);
|
||||
var $tr = $this.closest("tr");
|
||||
$tr.nextAll("tr").fadeToggle("fast");
|
||||
|
||||
if($tr.hasClass('contracted')){
|
||||
$this.css('cursor','n-resize');
|
||||
$tr.removeClass('contracted');
|
||||
$tr.addClass('expanded');
|
||||
$tr.removeClass('contracted').addClass('expanded');
|
||||
$tr.nextAll("tr").css('visibility', '');
|
||||
}else{
|
||||
$this.css('cursor','s-resize');
|
||||
$tr.removeClass('expanded');
|
||||
$tr.addClass('contracted');
|
||||
$tr.removeClass('expanded').addClass('contracted');
|
||||
$tr.nextAll("tr").css('visibility', 'hidden');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
@ -1,20 +1,18 @@
|
|||
/**
|
||||
* jQuery org-chart/tree plugin.
|
||||
*
|
||||
* Author: Wes Nolte
|
||||
* http://twitter.com/wesnolte
|
||||
*
|
||||
* Based on the work of Mark Lee
|
||||
* http://www.capricasoftware.co.uk
|
||||
*
|
||||
* ID implementation fixed by Adrian Hinz
|
||||
*
|
||||
* This software is licensed under the Creative Commons Attribution-ShareAlike
|
||||
* 3.0 License.
|
||||
*
|
||||
* See here for license terms:
|
||||
* http://creativecommons.org/licenses/by-sa/3.0
|
||||
*/
|
||||
* jQuery org-chart/tree plugin.
|
||||
*
|
||||
* Author: Wes Nolte
|
||||
* http://twitter.com/wesnolte
|
||||
*
|
||||
* Based on the work of Mark Lee
|
||||
* http://www.capricasoftware.co.uk
|
||||
*
|
||||
* This software is licensed under the Creative Commons Attribution-ShareAlike
|
||||
* 3.0 License.
|
||||
*
|
||||
* See here for license terms:
|
||||
* http://creativecommons.org/licenses/by-sa/3.0
|
||||
*/
|
||||
(function($) {
|
||||
|
||||
$.fn.jOrgChart = function(options) {
|
||||
|
@ -182,16 +180,15 @@
|
|||
$nodeDiv.click(function() {
|
||||
var $this = $(this);
|
||||
var $tr = $this.closest("tr");
|
||||
$tr.nextAll("tr").fadeToggle("fast");
|
||||
|
||||
if($tr.hasClass('contracted')){
|
||||
$this.css('cursor','n-resize');
|
||||
$tr.removeClass('contracted');
|
||||
$tr.addClass('expanded');
|
||||
$tr.removeClass('contracted').addClass('expanded');
|
||||
$tr.nextAll("tr").css('visibility', '');
|
||||
}else{
|
||||
$this.css('cursor','s-resize');
|
||||
$tr.removeClass('expanded');
|
||||
$tr.addClass('contracted');
|
||||
$tr.removeClass('expanded').addClass('contracted');
|
||||
$tr.nextAll("tr").css('visibility', 'hidden');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
@ -16,7 +16,7 @@ Features include:
|
|||
* Easy to style.
|
||||
* You can specify that sub-trees should start collapsed, which is useful for very large trees
|
||||
|
||||
![jQuery OrgChart](http://i.imgur.com/2OpyG.png "jQuery OrgChart")
|
||||
![jQuery OrgChart](http://i.imgur.com/T8kKA.png "jQuery OrgChart")
|
||||
|
||||
----
|
||||
|
||||
|
|
Loading…
Reference in New Issue