orgchart 4.0.0 → 4.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -4
- package/demo/export-chart-with-pictures.html +2 -1
- package/demo/nodes-of-different-widths.html +4 -3
- package/dist/css/jquery.orgchart.css +30 -30
- package/dist/css/jquery.orgchart.min.css +1 -1
- package/dist/js/jquery.orgchart.js +7 -1
- package/dist/js/jquery.orgchart.min.js +1 -1
- package/dist/js/jquery.orgchart.min.js.map +1 -1
- package/package.json +1 -1
- package/src/css/jquery.orgchart.css +30 -30
- package/src/js/jquery.orgchart.js +7 -1
package/package.json
CHANGED
|
@@ -535,15 +535,36 @@
|
|
|
535
535
|
}
|
|
536
536
|
|
|
537
537
|
/* styles for compact nodes */
|
|
538
|
-
.orgchart .
|
|
538
|
+
.orgchart .node.compact {
|
|
539
539
|
position: static;
|
|
540
540
|
display: grid;
|
|
541
541
|
width: 140px;
|
|
542
542
|
height: 50px;
|
|
543
|
-
overflow: hidden;
|
|
544
543
|
background-color: #eee;
|
|
545
544
|
}
|
|
546
545
|
|
|
546
|
+
.orgchart .node.compact.looseMode {
|
|
547
|
+
display: grid;
|
|
548
|
+
width: unset;
|
|
549
|
+
height: unset;
|
|
550
|
+
}
|
|
551
|
+
|
|
552
|
+
.orgchart .node.compact > .node {
|
|
553
|
+
display: none;
|
|
554
|
+
}
|
|
555
|
+
|
|
556
|
+
.orgchart .node.compact.looseMode > .node {
|
|
557
|
+
display: inline-block;
|
|
558
|
+
}
|
|
559
|
+
|
|
560
|
+
.orgchart .node.compact > .node.compact {
|
|
561
|
+
position: relative;
|
|
562
|
+
}
|
|
563
|
+
|
|
564
|
+
.orgchart .node.compact > .node.compact.looseMode {
|
|
565
|
+
display: grid;
|
|
566
|
+
}
|
|
567
|
+
|
|
547
568
|
.orgchart .node.compact.even,
|
|
548
569
|
.orgchart .node.compact.even:hover {
|
|
549
570
|
background-color: #eee;
|
|
@@ -566,43 +587,22 @@
|
|
|
566
587
|
background-color: #eee;
|
|
567
588
|
}
|
|
568
589
|
|
|
569
|
-
.orgchart .
|
|
570
|
-
display: grid;
|
|
571
|
-
width: unset;
|
|
572
|
-
height: unset;
|
|
573
|
-
overflow: unset;
|
|
574
|
-
}
|
|
575
|
-
|
|
576
|
-
.orgchart .hierarchy > .node.compact::before {
|
|
590
|
+
.orgchart .node.compact::before {
|
|
577
591
|
top: var(--top-cross-point, -10px);
|
|
578
592
|
}
|
|
579
593
|
|
|
580
|
-
.orgchart .node.compact > .
|
|
581
|
-
position: relative;
|
|
582
|
-
display: grid;
|
|
583
|
-
width: 140px;
|
|
584
|
-
height: 50px;
|
|
585
|
-
overflow: hidden;
|
|
586
|
-
}
|
|
587
|
-
|
|
588
|
-
.orgchart .node.compact .node.compact.looseMode {
|
|
589
|
-
width: unset;
|
|
590
|
-
height: unset;
|
|
591
|
-
overflow: unset;
|
|
592
|
-
}
|
|
593
|
-
|
|
594
|
-
.orgchart .hierarchy > .node.compact > .content {
|
|
594
|
+
.orgchart .node.compact > .content {
|
|
595
595
|
position: absolute;
|
|
596
596
|
top: 25px;
|
|
597
597
|
left: 5px;
|
|
598
598
|
}
|
|
599
599
|
|
|
600
|
-
.orgchart .
|
|
600
|
+
.orgchart .node.compact.looseMode > .title {
|
|
601
601
|
margin-top: 5px;
|
|
602
602
|
margin-left: 5px;
|
|
603
603
|
}
|
|
604
604
|
|
|
605
|
-
.orgchart .
|
|
605
|
+
.orgchart .node.compact.looseMode > .content {
|
|
606
606
|
top: 30px;
|
|
607
607
|
left: 10px;
|
|
608
608
|
}
|
|
@@ -635,13 +635,13 @@
|
|
|
635
635
|
cursor: pointer;
|
|
636
636
|
}
|
|
637
637
|
|
|
638
|
-
.orgchart .
|
|
638
|
+
.orgchart .node.compact > .backToCompactSymbol {
|
|
639
639
|
position: absolute;
|
|
640
640
|
top: 5px;
|
|
641
641
|
left: 5px;
|
|
642
642
|
}
|
|
643
643
|
|
|
644
|
-
.orgchart .
|
|
644
|
+
.orgchart .node.compact.looseMode > .backToCompactSymbol {
|
|
645
645
|
top: 10px;
|
|
646
646
|
left: 10px;
|
|
647
647
|
}
|
|
@@ -657,7 +657,7 @@
|
|
|
657
657
|
left: 3px;
|
|
658
658
|
}
|
|
659
659
|
|
|
660
|
-
.orgchart .
|
|
660
|
+
.orgchart .node.compact > .backToLooseSymbol {
|
|
661
661
|
position: absolute;
|
|
662
662
|
top: 25px;
|
|
663
663
|
right: 5px;
|
|
@@ -567,6 +567,9 @@
|
|
|
567
567
|
isVisibleNode: function (index, elem) {
|
|
568
568
|
return this.getNodeState($(elem)).visible;
|
|
569
569
|
},
|
|
570
|
+
isCompactDescendant: function (index, elem) {
|
|
571
|
+
return $(elem).parent().is('.node.compact');
|
|
572
|
+
},
|
|
570
573
|
// do some necessary cleanup tasks when hide animation is finished
|
|
571
574
|
hideChildrenEnd: function (event) {
|
|
572
575
|
var $node = event.data.node;
|
|
@@ -581,7 +584,7 @@
|
|
|
581
584
|
$node.closest('.hierarchy').addClass('isChildrenCollapsed');
|
|
582
585
|
var $lowerLevel = $node.siblings('.nodes');
|
|
583
586
|
this.stopAjax($lowerLevel);
|
|
584
|
-
var $animatedNodes = $lowerLevel.find('.node').filter(this.isVisibleNode.bind(this));
|
|
587
|
+
var $animatedNodes = $lowerLevel.find('.node').filter(this.isVisibleNode.bind(this)).not(this.isCompactDescendant.bind(this));
|
|
585
588
|
var isVerticalDesc = $lowerLevel.is('.vertical');
|
|
586
589
|
if (!isVerticalDesc) {
|
|
587
590
|
$animatedNodes.closest('.hierarchy').addClass('isCollapsedDescendant');
|
|
@@ -937,8 +940,11 @@
|
|
|
937
940
|
// show the compact node's children in the compact mode
|
|
938
941
|
backToCompactHandler: function (event) {
|
|
939
942
|
$(event.delegateTarget).removeClass('looseMode')
|
|
943
|
+
.find('.looseMode').removeClass('looseMode')
|
|
940
944
|
.children('.backToCompactSymbol').addClass('hidden').end()
|
|
941
945
|
.children('.backToLooseSymbol').removeClass('hidden');
|
|
946
|
+
$(event.delegateTarget).children('.backToCompactSymbol').addClass('hidden').end()
|
|
947
|
+
.children('.backToLooseSymbol').removeClass('hidden');
|
|
942
948
|
},
|
|
943
949
|
// show the compact node's children in the loose mode
|
|
944
950
|
backToLooseHandler: function (event) {
|