orgchart 3.6.0 → 3.7.0

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "orgchart",
3
- "version": "3.6.0",
3
+ "version": "3.7.0",
4
4
  "description": "Simple and direct organization chart(tree-like hierarchy) plugin based on pure DOM and jQuery.",
5
5
  "main": "./dist/js/jquery.orgchart.min.js",
6
6
  "style": [
@@ -19,10 +19,13 @@
19
19
  -moz-user-select: none;
20
20
  -ms-user-select: none;
21
21
  user-select: none;
22
- background-image: linear-gradient(90deg, rgba(200, 0, 0, 0.15) 10%, rgba(0, 0, 0, 0) 10%), linear-gradient(rgba(200, 0, 0, 0.15) 10%, rgba(0, 0, 0, 0) 10%);
23
- background-size: 10px 10px;
24
- border: 1px dashed rgba(0,0,0,0);
22
+ background-image: linear-gradient(to top, rgba(200, 0, 0, 0.15) 5%, rgba(0, 0, 0, 0) 5%),
23
+ linear-gradient(to right, rgba(200, 0, 0, 0.15) 5%, rgba(0, 0, 0, 0) 5%),
24
+ linear-gradient(to bottom, rgba(200, 0, 0, 0.15) 5%, rgba(0, 0, 0, 0) 5%),
25
+ linear-gradient(to left, rgba(200, 0, 0, 0.15) 5%, rgba(0, 0, 0, 0) 5%);
26
+ background-size: 10px 10px; /* background square size */
25
27
  padding: 20px 20px 0 20px;
28
+ /* border: 0.5px solid rgba(200, 0, 0, 0.15); */
26
29
  }
27
30
 
28
31
  .orgchart .hidden, .orgchart~.hidden {
@@ -90,7 +93,7 @@
90
93
  .orgchart .hierarchy::before {
91
94
  content: "";
92
95
  position: absolute;
93
- top: -11px;
96
+ top: -11px; /* -(background square size + half width of line) */
94
97
  left: 0;
95
98
  width: 100%;
96
99
  border-top: 2px solid rgba(217, 83, 79, 0.8);
@@ -132,10 +135,10 @@
132
135
  .orgchart .node:not(:only-child)::after {
133
136
  content: "";
134
137
  position: absolute;
135
- bottom: -11px;
138
+ bottom: -12px; /* -(background square size + node's border width) */
136
139
  left: calc(50% - 1px);
137
140
  width: 2px;
138
- height: 9px;
141
+ height: 10px; /* background square size */
139
142
  background-color: rgba(217, 83, 79, 0.8);
140
143
  }
141
144
 
@@ -155,16 +158,16 @@
155
158
  .orgchart > ul > li > ul li > .node::before {
156
159
  content: "";
157
160
  position: absolute;
158
- top: var(--top, -11px);
161
+ top: var(--top, -12px); /* -(fallback value = background square size + border width of node) */
159
162
  left: calc(50% - 1px);
160
163
  width: 2px;
161
- height: var(--height, 9px);
164
+ height: var(--height, 10px); /* fallback value = background square size */
162
165
  background-color: rgba(217, 83, 79, 0.8);
163
166
  }
164
167
 
165
168
  .orgchart > ul > li > ul li.isSiblingsCollapsed > .node::before {
166
- top: var(--top-cross-point, -13px);
167
- height: var(--height-cross-point, 11px);
169
+ top: var(--top-cross-point, -12px);
170
+ height: var(--height-cross-point, 10px);
168
171
  }
169
172
 
170
173
  /* node styling */
@@ -227,12 +230,12 @@
227
230
 
228
231
  .orgchart .node .title {
229
232
  box-sizing: border-box;
230
- padding: 2px;
231
233
  width: 130px;
232
234
  text-align: center;
233
- font-size: 0.75rem;
235
+ font-size: 12px;
234
236
  font-weight: bold;
235
237
  height: 20px;
238
+ line-height: 20px;
236
239
  overflow: hidden;
237
240
  text-overflow: ellipsis;
238
241
  white-space: nowrap;
@@ -256,28 +259,26 @@
256
259
  transform-origin: bottom center;
257
260
  }
258
261
 
259
- .orgchart .node .title .symbol {
262
+ .orgchart .node .title .parentNodeSymbol {
260
263
  float: left;
261
- margin-top: 12px;
262
- margin-left: 2px;
263
264
  }
264
265
 
265
- .orgchart .node .title .symbol::before {
266
- background-color: #fff;
267
- border-color: rgba(217, 83, 79, 0.8);
266
+ .orgchart .node .title .parentNodeSymbol::before {
267
+ color: #fff;
268
268
  }
269
269
 
270
- .orgchart .node .title .symbol::after {
270
+ .orgchart .node .title .parentNodeSymbol::after {
271
271
  background-color: #fff;
272
272
  }
273
273
 
274
274
  .orgchart .node .content {
275
275
  box-sizing: border-box;
276
- padding: 2px;
277
276
  height: 20px;
278
- font-size: 0.625rem;
277
+ line-height: 20px;
278
+ font-size: 10px;
279
279
  border: 1px solid rgba(217, 83, 79, 0.8);
280
- border-radius: 0 0 4px 4px;
280
+ border-width: 0 1px 1px 1px;
281
+ border-radius: 0 0 0.25rem 0.25rem;
281
282
  text-align: center;
282
283
  background-color: #fff;
283
284
  color: #333;
@@ -325,16 +326,14 @@
325
326
  }
326
327
 
327
328
  .orgchart .node .verticalEdge {
328
- width: calc(100% - 6px);
329
- width: -webkit-calc(100% - 6px);
330
- width: -moz-calc(100% - 6px);
331
- height: 10px;
332
- left: 3px;
329
+ width: calc(100% - 6px); /* node top half's width */
330
+ height: 10px; /* background square's size */
331
+ left: 3px; /* node's padding value */
333
332
  }
334
333
 
335
334
  .orgchart .node .verticalEdge::before {
336
335
  position: absolute;
337
- left: calc(50% - 0.3125rem);
336
+ left: calc(50% - 5px); /* 50% width of node - half width of up arrow icon) */
338
337
  }
339
338
 
340
339
  .orgchart .node .topEdge {
@@ -350,7 +349,7 @@
350
349
  }
351
350
 
352
351
  .orgchart .node .bottomEdge {
353
- bottom: -2px;
352
+ bottom: -2px; /* -(node's border-width) */
354
353
  }
355
354
 
356
355
  .orgchart .node .bottomEdge.oci-chevron-up::before {
@@ -364,9 +363,7 @@
364
363
  .orgchart .node .horizontalEdge {
365
364
  width: 10px;
366
365
  height: calc(100% - 6px);
367
- height: -webkit-calc(100% - 6px);
368
- height: -moz-calc(100% - 6px);
369
- top: 3px;
366
+ top: 3px; /* node's padding */
370
367
  }
371
368
 
372
369
  .orgchart .node .rightEdge {
@@ -379,15 +376,7 @@
379
376
 
380
377
  .orgchart .node .horizontalEdge::before {
381
378
  position: absolute;
382
- top: calc(50% - 0.3125rem);
383
- }
384
-
385
- .orgchart .node .rightEdge.oci-chevron-left::before {
386
- right: -3px;
387
- }
388
-
389
- .orgchart .node .rightEdge.oci-chevron-right::before {
390
- right: 1px;
379
+ top: calc(50% - 5px);
391
380
  }
392
381
 
393
382
  .orgchart .node .leftEdge.oci-chevron-right::before {
@@ -398,16 +387,27 @@
398
387
  left: 1px;
399
388
  }
400
389
 
390
+ .orgchart .node .rightEdge.oci-chevron-left::before {
391
+ right: -3px;
392
+ }
393
+
394
+ .orgchart .node .rightEdge.oci-chevron-right::before {
395
+ right: 1px;
396
+ }
397
+
401
398
  .orgchart .node .toggleBtn {
402
399
  position: absolute;
403
- left: 5px;
400
+ left: -2px; /* -(border width of node) */
404
401
  bottom: -2px;
405
- width: 1rem;
406
- height: 1rem;
402
+ width: 16px;
403
+ height: 16px;
407
404
  }
408
405
 
409
406
  .orgchart .node .toggleBtn::before {
410
407
  background-color: rgba(68, 157, 68, 0.6);
408
+ position: absolute;
409
+ left: 0;
410
+ bottom: 0;
411
411
  }
412
412
 
413
413
  .orgchart .node .toggleBtn:hover::before {
@@ -463,14 +463,14 @@
463
463
 
464
464
  .orgchart .nodes.vertical {
465
465
  display: block;
466
- padding-left: 18px;
466
+ padding-left: 10px; /* width of background square*/
467
467
  }
468
468
 
469
469
  .orgchart .nodes.vertical .nodes {
470
470
  list-style: none;
471
471
  display: block;
472
472
  margin: 0;
473
- padding-left: 18px;
473
+ padding-left: 10px; /* width of background square*/
474
474
  text-align: left;
475
475
  }
476
476
 
@@ -483,45 +483,54 @@
483
483
  content: none;
484
484
  }
485
485
 
486
- .orgchart .nodes.vertical > .hierarchy:first-child::before {
487
- box-sizing: border-box;
488
- top: -11px;
489
- height: 35px;
490
- width: calc(50% - 2px);
491
- border-width: 2px 0 0 2px;
492
- }
493
- .orgchart .nodes.vertical .hierarchy{
486
+ .orgchart .nodes.vertical .hierarchy {
494
487
  position: relative;
495
488
  text-align: left;
496
489
  }
490
+
497
491
  .orgchart .nodes.vertical .hierarchy::before,
498
492
  .orgchart .nodes.vertical .hierarchy::after {
499
493
  box-sizing: border-box;
500
494
  content: '';
501
495
  position: absolute;
502
- left: -6px;
496
+ left: -6px; /* -(background square size + half width of line */
503
497
  border-color: rgba(217, 83, 79, 0.8);
504
498
  border-style: solid;
505
499
  border-width: 0 0 2px 2px;
506
500
  }
501
+
507
502
  .orgchart .nodes.vertical .hierarchy::before {
508
- top: -4px;
509
- height: 30px;
510
- width: 11px;
503
+ top: 0px;
504
+ height: 26px; /* node top half's height(25px) + half width of line */
505
+ width: 11px; /* background square size + half width of line */
511
506
  }
507
+
512
508
  .orgchart .nodes.vertical .hierarchy::after {
513
- top: 1px;
514
- height: 100%;
509
+ bottom: 0;
510
+ height: calc(100% - 24px); /* height of hierarchy - (node top half's height(25px) - half width of line) */
515
511
  }
516
- .orgchart .nodes.vertical .hierarchy:first-child::after {
512
+
513
+ .orgchart .nodes.vertical .hierarchy:last-child::after {
514
+ border-width: 2px 0 0 0;
515
+ }
516
+
517
+ .orgchart .nodes.vertical > .hierarchy:first-child::before {
517
518
  box-sizing: border-box;
518
- top: 24px;
519
- width: 11px;
519
+ top: -11px; /* -(background square size + half width of line) */
520
+ height: 35px; /* node top half's height + node padding + node border width + background square size */
521
+ width: calc(50% + 2px);
520
522
  border-width: 2px 0 0 2px;
521
523
  }
522
- .orgchart .nodes.vertical .hierarchy:last-child::after {
524
+
525
+ .orgchart .nodes.vertical > .hierarchy:first-child::after {
523
526
  box-sizing: border-box;
524
- border-width: 2px 0 0;
527
+ top: 24px; /* node bottom half's height(25px) - half border width of line */
528
+ width: 11px; /* backgroud square size + half border width of line */
529
+ border-width: 2px 0 0 2px;
530
+ }
531
+
532
+ .orgchart .nodes.vertical > .hierarchy:first-child:last-child::after {
533
+ border-width: 2px 0 0 0;
525
534
  }
526
535
 
527
536
  /* custom icons for orgchart */
@@ -532,159 +541,116 @@
532
541
  font-family: Arial;
533
542
  }
534
543
 
535
- .oci-chevron-up::before {
536
- content: "";
544
+ .oci-menu::before {
545
+ content: "≡";
537
546
  display: inline-block;
538
- box-sizing: border-box;
539
- vertical-align: text-bottom;
540
- width: 0.625rem;
541
- height: 0.625rem;
542
- border-width: 0 0.2rem 0.2rem 0;
543
- border-style: solid;
544
- border-color: #000;
545
- background: transparent;
546
- transform: rotate(-135deg);
547
+ width: 1rem;
548
+ height: 1rem;
549
+ text-align: center;
550
+ line-height: 1rem;
551
+ color: #000;
552
+ font-size: 1rem;
547
553
  }
548
554
 
549
- .oci-chevron-right::before {
555
+ .oci-chevron-up::before {
550
556
  content: "";
551
- display: inline-block;
552
557
  box-sizing: border-box;
553
- width: 0.625rem;
554
- height: 0.625rem;
555
- border-width: 0 0.2rem 0.2rem 0;
556
- border-style: solid;
557
- border-color: #000;
558
- background: transparent;
559
- transform: rotate(-45deg);
558
+ width: 10px;
559
+ height: 10px;
560
+ display: inline-block;
561
+ border: 3px solid #000;
562
+ transform: rotate(45deg);
563
+ border-right: unset;
564
+ border-bottom: unset;
560
565
  }
561
566
 
562
567
  .oci-chevron-down::before {
563
568
  content: "";
564
- display: inline-block;
565
569
  box-sizing: border-box;
566
- width: 0.625rem;
567
- height: 0.625rem;
568
- border-width: 0 0.2rem 0.2rem 0;
569
- border-style: solid;
570
- border-color: #000;
571
- background: transparent;
570
+ width: 10px;
571
+ height: 10px;
572
+ display: inline-block;
573
+ border: 3px solid #000;
572
574
  transform: rotate(45deg);
575
+ border-top: unset;
576
+ border-left: unset;
573
577
  }
574
578
 
575
579
  .oci-chevron-left::before {
576
580
  content: "";
577
- display: inline-block;
578
581
  box-sizing: border-box;
579
- width: 0.625rem;
580
- height: 0.625rem;
581
- border-width: 0 0.2rem 0.2rem 0;
582
- border-style: solid;
583
- border-color: #000;
584
- background: transparent;
585
- transform: rotate(135deg);
586
- }
587
-
588
- .oci-leader::before {
589
- position: absolute;
590
- content: "";
582
+ width: 10px;
583
+ height: 10px;
591
584
  display: inline-block;
592
- width: 0.4rem;
593
- height: 0.4rem;
594
- border-radius: 0.2rem;
595
- background: #000;
596
- top: -0.75rem;
597
- left: 0.1rem;
585
+ border: 3px solid #000;
586
+ transform: rotate(45deg);
587
+ border-top: unset;
588
+ border-right: unset;
598
589
  }
599
590
 
600
- .oci-leader::after {
601
- position: absolute;
591
+ .oci-chevron-right::before {
602
592
  content: "";
593
+ box-sizing: border-box;
594
+ width: 10px;
595
+ height: 10px;
603
596
  display: inline-block;
604
- width: 0.875rem;
605
- height: 0.375rem;
606
- border-radius: 0.25rem 0.25rem 0 0;
607
- background: #000;
608
- top: -0.3rem;
609
- left: -0.125rem;
597
+ border: 3px solid #000;
598
+ transform: rotate(45deg);
599
+ border-left: unset;
600
+ border-bottom: unset;
610
601
  }
611
602
 
612
603
  .oci-plus-square::before {
613
- content: "+";
614
- display: inline-block;
615
- vertical-align: text-bottom;
616
- text-align: center;
617
- width: 1rem;
618
- height: 1rem;
619
- background-color: #000;
620
- color: #fff;
621
- }
622
-
623
- .oci-plus-circle::before {
624
- content: "+";
604
+ content: "﹢";
625
605
  display: inline-block;
626
- vertical-align: text-bottom;
606
+ width: 16px;
607
+ height: 16px;
627
608
  text-align: center;
628
- width: 1rem;
629
- height: 1rem;
630
- border-radius: 0.5rem;
609
+ line-height: 16px;
631
610
  background-color: #000;
632
611
  color: #fff;
612
+ font-weight: bold;
633
613
  }
634
614
 
635
615
  .oci-minus-square::before {
636
- content: "−";
616
+ content: "﹣";
637
617
  display: inline-block;
638
- vertical-align: text-bottom;
618
+ width: 16px;
619
+ height: 16px;
639
620
  text-align: center;
640
- width: 1rem;
641
- height: 1rem;
621
+ line-height: 16px;
642
622
  background-color: #000;
643
623
  color: #fff;
624
+ font-weight: bold;
644
625
  }
645
626
 
646
- .oci-minus-circle::before {
647
- content: "−";
627
+ .oci-arrow-square-up::before {
628
+ content: "⬆";
648
629
  display: inline-block;
649
- vertical-align: text-bottom;
650
- text-align: center;
651
630
  width: 1rem;
652
631
  height: 1rem;
653
- border-radius: 0.5rem;
654
- background-color: #000;
655
- color: #fff;
656
- }
657
-
658
- .oci-arrow-circle-up::before {
659
- content: "▲";
660
- display: inline-block;
661
632
  text-align: center;
662
- vertical-align: text-bottom;
663
- width: 1rem;
664
- height: 1rem;
665
- border-radius: 0.5rem;
633
+ line-height: 1rem;
666
634
  background-color: #000;
667
635
  color: #fff;
668
- font-size: 0.875rem;
636
+ font-weight: bold;
669
637
  }
670
638
 
671
- .oci-arrow-circle-down::before {
672
- content: "▼";
673
- text-align: center;
639
+ .oci-arrow-square-down::before {
640
+ content: "⬇";
674
641
  display: inline-block;
675
- vertical-align: text-bottom;
676
642
  width: 1rem;
677
643
  height: 1rem;
678
- border-radius: 0.5rem;
644
+ text-align: center;
645
+ line-height: 1rem;
679
646
  background-color: #000;
680
647
  color: #fff;
681
- font-size: 0.875rem;
648
+ font-weight: bold;
682
649
  }
683
650
 
684
651
  .oci-info-circle::before {
685
652
  content: "i";
686
653
  display: inline-block;
687
- vertical-align: text-bottom;
688
654
  width: 1rem;
689
655
  height: 1rem;
690
656
  border-radius: 0.5rem;