@things-factory/integration-ui 6.1.105 → 6.1.107
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.
|
@@ -25,10 +25,6 @@ export class GraphViewer {
|
|
|
25
25
|
arrowSize: 4,
|
|
26
26
|
colors: this.colors(),
|
|
27
27
|
highlight: undefined,
|
|
28
|
-
iconMap: this.fontAwesomeIcons(),
|
|
29
|
-
icons: undefined,
|
|
30
|
-
imageMap: {},
|
|
31
|
-
images: undefined,
|
|
32
28
|
infoPanel: true,
|
|
33
29
|
minCollision: undefined,
|
|
34
30
|
graphData: undefined,
|
|
@@ -181,7 +177,7 @@ export class GraphViewer {
|
|
|
181
177
|
}
|
|
182
178
|
})
|
|
183
179
|
.on('dblclick', (event, d) => {
|
|
184
|
-
this.stickNode(
|
|
180
|
+
this.stickNode(event, d)
|
|
185
181
|
|
|
186
182
|
if (typeof this.options.onNodeDoubleClick === 'function') {
|
|
187
183
|
this.options.onNodeDoubleClick(d)
|
|
@@ -298,27 +294,15 @@ export class GraphViewer {
|
|
|
298
294
|
appendTextToNode(node) {
|
|
299
295
|
return node
|
|
300
296
|
.append('text')
|
|
301
|
-
.attr('class', d => {
|
|
302
|
-
return 'text' + (this.icon(d) ? ' icon' : '')
|
|
303
|
-
})
|
|
304
297
|
.attr('fill', '#ffffff')
|
|
305
|
-
.attr('font-size', d => {
|
|
306
|
-
return this.icon(d) ? this.options.nodeRadius + 'px' : '10px'
|
|
307
|
-
})
|
|
308
298
|
.attr('pointer-events', 'none')
|
|
309
299
|
.attr('text-anchor', 'middle')
|
|
310
|
-
.attr('y',
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
.
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
})
|
|
317
|
-
}
|
|
318
|
-
|
|
319
|
-
appendRandomDataToNode(d, maxNodesToGenerate) {
|
|
320
|
-
var data = this.randomD3Data(d, maxNodesToGenerate)
|
|
321
|
-
this.updateWithGraphData(data)
|
|
300
|
+
.attr('y', '24px')
|
|
301
|
+
.attr('font-family', 'Material Icons')
|
|
302
|
+
.attr('font-size', '48px')
|
|
303
|
+
.attr('text-anchor', 'middle')
|
|
304
|
+
.attr('alignment-baseline', 'middle')
|
|
305
|
+
.text(d => this.icon(d))
|
|
322
306
|
}
|
|
323
307
|
|
|
324
308
|
appendRelationship() {
|
|
@@ -442,7 +426,7 @@ export class GraphViewer {
|
|
|
442
426
|
return d3.rgb(this.options.colors[this.options.colors.length - 1]).darker(1)
|
|
443
427
|
}
|
|
444
428
|
|
|
445
|
-
dragEnded(
|
|
429
|
+
dragEnded(event, d) {
|
|
446
430
|
if (!event.active) {
|
|
447
431
|
this.simulation.alphaTarget(0)
|
|
448
432
|
}
|
|
@@ -452,11 +436,11 @@ export class GraphViewer {
|
|
|
452
436
|
}
|
|
453
437
|
}
|
|
454
438
|
|
|
455
|
-
dragged(
|
|
456
|
-
this.stickNode(
|
|
439
|
+
dragged(event, d) {
|
|
440
|
+
this.stickNode(event, d)
|
|
457
441
|
}
|
|
458
442
|
|
|
459
|
-
dragStarted(
|
|
443
|
+
dragStarted(event, d) {
|
|
460
444
|
if (!event.active) {
|
|
461
445
|
this.simulation.alphaTarget(0.3).restart()
|
|
462
446
|
}
|
|
@@ -478,659 +462,8 @@ export class GraphViewer {
|
|
|
478
462
|
return obj
|
|
479
463
|
}
|
|
480
464
|
|
|
481
|
-
fontAwesomeIcons() {
|
|
482
|
-
return {
|
|
483
|
-
glass: 'f000',
|
|
484
|
-
music: 'f001',
|
|
485
|
-
search: 'f002',
|
|
486
|
-
'envelope-o': 'f003',
|
|
487
|
-
heart: 'f004',
|
|
488
|
-
star: 'f005',
|
|
489
|
-
'star-o': 'f006',
|
|
490
|
-
user: 'f007',
|
|
491
|
-
film: 'f008',
|
|
492
|
-
'th-large': 'f009',
|
|
493
|
-
th: 'f00a',
|
|
494
|
-
'th-list': 'f00b',
|
|
495
|
-
check: 'f00c',
|
|
496
|
-
'remove,close,times': 'f00d',
|
|
497
|
-
'search-plus': 'f00e',
|
|
498
|
-
'search-minus': 'f010',
|
|
499
|
-
'power-off': 'f011',
|
|
500
|
-
signal: 'f012',
|
|
501
|
-
'gear,cog': 'f013',
|
|
502
|
-
'trash-o': 'f014',
|
|
503
|
-
home: 'f015',
|
|
504
|
-
'file-o': 'f016',
|
|
505
|
-
'clock-o': 'f017',
|
|
506
|
-
road: 'f018',
|
|
507
|
-
download: 'f019',
|
|
508
|
-
'arrow-circle-o-down': 'f01a',
|
|
509
|
-
'arrow-circle-o-up': 'f01b',
|
|
510
|
-
inbox: 'f01c',
|
|
511
|
-
'play-circle-o': 'f01d',
|
|
512
|
-
'rotate-right,repeat': 'f01e',
|
|
513
|
-
refresh: 'f021',
|
|
514
|
-
'list-alt': 'f022',
|
|
515
|
-
lock: 'f023',
|
|
516
|
-
flag: 'f024',
|
|
517
|
-
headphones: 'f025',
|
|
518
|
-
'volume-off': 'f026',
|
|
519
|
-
'volume-down': 'f027',
|
|
520
|
-
'volume-up': 'f028',
|
|
521
|
-
qrcode: 'f029',
|
|
522
|
-
barcode: 'f02a',
|
|
523
|
-
tag: 'f02b',
|
|
524
|
-
tags: 'f02c',
|
|
525
|
-
book: 'f02d',
|
|
526
|
-
bookmark: 'f02e',
|
|
527
|
-
print: 'f02f',
|
|
528
|
-
camera: 'f030',
|
|
529
|
-
font: 'f031',
|
|
530
|
-
bold: 'f032',
|
|
531
|
-
italic: 'f033',
|
|
532
|
-
'text-height': 'f034',
|
|
533
|
-
'text-width': 'f035',
|
|
534
|
-
'align-left': 'f036',
|
|
535
|
-
'align-center': 'f037',
|
|
536
|
-
'align-right': 'f038',
|
|
537
|
-
'align-justify': 'f039',
|
|
538
|
-
list: 'f03a',
|
|
539
|
-
'dedent,outdent': 'f03b',
|
|
540
|
-
indent: 'f03c',
|
|
541
|
-
'video-camera': 'f03d',
|
|
542
|
-
'photo,image,picture-o': 'f03e',
|
|
543
|
-
pencil: 'f040',
|
|
544
|
-
'map-marker': 'f041',
|
|
545
|
-
adjust: 'f042',
|
|
546
|
-
tint: 'f043',
|
|
547
|
-
'edit,pencil-square-o': 'f044',
|
|
548
|
-
'share-square-o': 'f045',
|
|
549
|
-
'check-square-o': 'f046',
|
|
550
|
-
arrows: 'f047',
|
|
551
|
-
'step-backward': 'f048',
|
|
552
|
-
'fast-backward': 'f049',
|
|
553
|
-
backward: 'f04a',
|
|
554
|
-
play: 'f04b',
|
|
555
|
-
pause: 'f04c',
|
|
556
|
-
stop: 'f04d',
|
|
557
|
-
forward: 'f04e',
|
|
558
|
-
'fast-forward': 'f050',
|
|
559
|
-
'step-forward': 'f051',
|
|
560
|
-
eject: 'f052',
|
|
561
|
-
'chevron-left': 'f053',
|
|
562
|
-
'chevron-right': 'f054',
|
|
563
|
-
'plus-circle': 'f055',
|
|
564
|
-
'minus-circle': 'f056',
|
|
565
|
-
'times-circle': 'f057',
|
|
566
|
-
'check-circle': 'f058',
|
|
567
|
-
'question-circle': 'f059',
|
|
568
|
-
'info-circle': 'f05a',
|
|
569
|
-
crosshairs: 'f05b',
|
|
570
|
-
'times-circle-o': 'f05c',
|
|
571
|
-
'check-circle-o': 'f05d',
|
|
572
|
-
ban: 'f05e',
|
|
573
|
-
'arrow-left': 'f060',
|
|
574
|
-
'arrow-right': 'f061',
|
|
575
|
-
'arrow-up': 'f062',
|
|
576
|
-
'arrow-down': 'f063',
|
|
577
|
-
'mail-forward,share': 'f064',
|
|
578
|
-
expand: 'f065',
|
|
579
|
-
compress: 'f066',
|
|
580
|
-
plus: 'f067',
|
|
581
|
-
minus: 'f068',
|
|
582
|
-
asterisk: 'f069',
|
|
583
|
-
'exclamation-circle': 'f06a',
|
|
584
|
-
gift: 'f06b',
|
|
585
|
-
leaf: 'f06c',
|
|
586
|
-
fire: 'f06d',
|
|
587
|
-
eye: 'f06e',
|
|
588
|
-
'eye-slash': 'f070',
|
|
589
|
-
'warning,exclamation-triangle': 'f071',
|
|
590
|
-
plane: 'f072',
|
|
591
|
-
calendar: 'f073',
|
|
592
|
-
random: 'f074',
|
|
593
|
-
comment: 'f075',
|
|
594
|
-
magnet: 'f076',
|
|
595
|
-
'chevron-up': 'f077',
|
|
596
|
-
'chevron-down': 'f078',
|
|
597
|
-
retweet: 'f079',
|
|
598
|
-
'shopping-cart': 'f07a',
|
|
599
|
-
folder: 'f07b',
|
|
600
|
-
'folder-open': 'f07c',
|
|
601
|
-
'arrows-v': 'f07d',
|
|
602
|
-
'arrows-h': 'f07e',
|
|
603
|
-
'bar-chart-o,bar-chart': 'f080',
|
|
604
|
-
'twitter-square': 'f081',
|
|
605
|
-
'facebook-square': 'f082',
|
|
606
|
-
'camera-retro': 'f083',
|
|
607
|
-
key: 'f084',
|
|
608
|
-
'gears,cogs': 'f085',
|
|
609
|
-
comments: 'f086',
|
|
610
|
-
'thumbs-o-up': 'f087',
|
|
611
|
-
'thumbs-o-down': 'f088',
|
|
612
|
-
'star-half': 'f089',
|
|
613
|
-
'heart-o': 'f08a',
|
|
614
|
-
'sign-out': 'f08b',
|
|
615
|
-
'linkedin-square': 'f08c',
|
|
616
|
-
'thumb-tack': 'f08d',
|
|
617
|
-
'external-link': 'f08e',
|
|
618
|
-
'sign-in': 'f090',
|
|
619
|
-
trophy: 'f091',
|
|
620
|
-
'github-square': 'f092',
|
|
621
|
-
upload: 'f093',
|
|
622
|
-
'lemon-o': 'f094',
|
|
623
|
-
phone: 'f095',
|
|
624
|
-
'square-o': 'f096',
|
|
625
|
-
'bookmark-o': 'f097',
|
|
626
|
-
'phone-square': 'f098',
|
|
627
|
-
twitter: 'f099',
|
|
628
|
-
'facebook-f,facebook': 'f09a',
|
|
629
|
-
github: 'f09b',
|
|
630
|
-
unlock: 'f09c',
|
|
631
|
-
'credit-card': 'f09d',
|
|
632
|
-
'feed,rss': 'f09e',
|
|
633
|
-
'hdd-o': 'f0a0',
|
|
634
|
-
bullhorn: 'f0a1',
|
|
635
|
-
bell: 'f0f3',
|
|
636
|
-
certificate: 'f0a3',
|
|
637
|
-
'hand-o-right': 'f0a4',
|
|
638
|
-
'hand-o-left': 'f0a5',
|
|
639
|
-
'hand-o-up': 'f0a6',
|
|
640
|
-
'hand-o-down': 'f0a7',
|
|
641
|
-
'arrow-circle-left': 'f0a8',
|
|
642
|
-
'arrow-circle-right': 'f0a9',
|
|
643
|
-
'arrow-circle-up': 'f0aa',
|
|
644
|
-
'arrow-circle-down': 'f0ab',
|
|
645
|
-
globe: 'f0ac',
|
|
646
|
-
wrench: 'f0ad',
|
|
647
|
-
tasks: 'f0ae',
|
|
648
|
-
filter: 'f0b0',
|
|
649
|
-
briefcase: 'f0b1',
|
|
650
|
-
'arrows-alt': 'f0b2',
|
|
651
|
-
'group,users': 'f0c0',
|
|
652
|
-
'chain,link': 'f0c1',
|
|
653
|
-
cloud: 'f0c2',
|
|
654
|
-
flask: 'f0c3',
|
|
655
|
-
'cut,scissors': 'f0c4',
|
|
656
|
-
'copy,files-o': 'f0c5',
|
|
657
|
-
paperclip: 'f0c6',
|
|
658
|
-
'save,floppy-o': 'f0c7',
|
|
659
|
-
square: 'f0c8',
|
|
660
|
-
'navicon,reorder,bars': 'f0c9',
|
|
661
|
-
'list-ul': 'f0ca',
|
|
662
|
-
'list-ol': 'f0cb',
|
|
663
|
-
strikethrough: 'f0cc',
|
|
664
|
-
underline: 'f0cd',
|
|
665
|
-
table: 'f0ce',
|
|
666
|
-
magic: 'f0d0',
|
|
667
|
-
truck: 'f0d1',
|
|
668
|
-
pinterest: 'f0d2',
|
|
669
|
-
'pinterest-square': 'f0d3',
|
|
670
|
-
'google-plus-square': 'f0d4',
|
|
671
|
-
'google-plus': 'f0d5',
|
|
672
|
-
money: 'f0d6',
|
|
673
|
-
'caret-down': 'f0d7',
|
|
674
|
-
'caret-up': 'f0d8',
|
|
675
|
-
'caret-left': 'f0d9',
|
|
676
|
-
'caret-right': 'f0da',
|
|
677
|
-
columns: 'f0db',
|
|
678
|
-
'unsorted,sort': 'f0dc',
|
|
679
|
-
'sort-down,sort-desc': 'f0dd',
|
|
680
|
-
'sort-up,sort-asc': 'f0de',
|
|
681
|
-
envelope: 'f0e0',
|
|
682
|
-
linkedin: 'f0e1',
|
|
683
|
-
'rotate-left,undo': 'f0e2',
|
|
684
|
-
'legal,gavel': 'f0e3',
|
|
685
|
-
'dashboard,tachometer': 'f0e4',
|
|
686
|
-
'comment-o': 'f0e5',
|
|
687
|
-
'comments-o': 'f0e6',
|
|
688
|
-
'flash,bolt': 'f0e7',
|
|
689
|
-
sitemap: 'f0e8',
|
|
690
|
-
umbrella: 'f0e9',
|
|
691
|
-
'paste,clipboard': 'f0ea',
|
|
692
|
-
'lightbulb-o': 'f0eb',
|
|
693
|
-
exchange: 'f0ec',
|
|
694
|
-
'cloud-download': 'f0ed',
|
|
695
|
-
'cloud-upload': 'f0ee',
|
|
696
|
-
'user-md': 'f0f0',
|
|
697
|
-
stethoscope: 'f0f1',
|
|
698
|
-
suitcase: 'f0f2',
|
|
699
|
-
'bell-o': 'f0a2',
|
|
700
|
-
coffee: 'f0f4',
|
|
701
|
-
cutlery: 'f0f5',
|
|
702
|
-
'file-text-o': 'f0f6',
|
|
703
|
-
'building-o': 'f0f7',
|
|
704
|
-
'hospital-o': 'f0f8',
|
|
705
|
-
ambulance: 'f0f9',
|
|
706
|
-
medkit: 'f0fa',
|
|
707
|
-
'fighter-jet': 'f0fb',
|
|
708
|
-
beer: 'f0fc',
|
|
709
|
-
'h-square': 'f0fd',
|
|
710
|
-
'plus-square': 'f0fe',
|
|
711
|
-
'angle-double-left': 'f100',
|
|
712
|
-
'angle-double-right': 'f101',
|
|
713
|
-
'angle-double-up': 'f102',
|
|
714
|
-
'angle-double-down': 'f103',
|
|
715
|
-
'angle-left': 'f104',
|
|
716
|
-
'angle-right': 'f105',
|
|
717
|
-
'angle-up': 'f106',
|
|
718
|
-
'angle-down': 'f107',
|
|
719
|
-
desktop: 'f108',
|
|
720
|
-
laptop: 'f109',
|
|
721
|
-
tablet: 'f10a',
|
|
722
|
-
'mobile-phone,mobile': 'f10b',
|
|
723
|
-
'circle-o': 'f10c',
|
|
724
|
-
'quote-left': 'f10d',
|
|
725
|
-
'quote-right': 'f10e',
|
|
726
|
-
spinner: 'f110',
|
|
727
|
-
circle: 'f111',
|
|
728
|
-
'mail-reply,reply': 'f112',
|
|
729
|
-
'github-alt': 'f113',
|
|
730
|
-
'folder-o': 'f114',
|
|
731
|
-
'folder-open-o': 'f115',
|
|
732
|
-
'smile-o': 'f118',
|
|
733
|
-
'frown-o': 'f119',
|
|
734
|
-
'meh-o': 'f11a',
|
|
735
|
-
gamepad: 'f11b',
|
|
736
|
-
'keyboard-o': 'f11c',
|
|
737
|
-
'flag-o': 'f11d',
|
|
738
|
-
'flag-checkered': 'f11e',
|
|
739
|
-
terminal: 'f120',
|
|
740
|
-
code: 'f121',
|
|
741
|
-
'mail-reply-all,reply-all': 'f122',
|
|
742
|
-
'star-half-empty,star-half-full,star-half-o': 'f123',
|
|
743
|
-
'location-arrow': 'f124',
|
|
744
|
-
crop: 'f125',
|
|
745
|
-
'code-fork': 'f126',
|
|
746
|
-
'unlink,chain-broken': 'f127',
|
|
747
|
-
question: 'f128',
|
|
748
|
-
info: 'f129',
|
|
749
|
-
exclamation: 'f12a',
|
|
750
|
-
superscript: 'f12b',
|
|
751
|
-
subscript: 'f12c',
|
|
752
|
-
eraser: 'f12d',
|
|
753
|
-
'puzzle-piece': 'f12e',
|
|
754
|
-
microphone: 'f130',
|
|
755
|
-
'microphone-slash': 'f131',
|
|
756
|
-
shield: 'f132',
|
|
757
|
-
'calendar-o': 'f133',
|
|
758
|
-
'fire-extinguisher': 'f134',
|
|
759
|
-
rocket: 'f135',
|
|
760
|
-
maxcdn: 'f136',
|
|
761
|
-
'chevron-circle-left': 'f137',
|
|
762
|
-
'chevron-circle-right': 'f138',
|
|
763
|
-
'chevron-circle-up': 'f139',
|
|
764
|
-
'chevron-circle-down': 'f13a',
|
|
765
|
-
html5: 'f13b',
|
|
766
|
-
css3: 'f13c',
|
|
767
|
-
anchor: 'f13d',
|
|
768
|
-
'unlock-alt': 'f13e',
|
|
769
|
-
bullseye: 'f140',
|
|
770
|
-
'ellipsis-h': 'f141',
|
|
771
|
-
'ellipsis-v': 'f142',
|
|
772
|
-
'rss-square': 'f143',
|
|
773
|
-
'play-circle': 'f144',
|
|
774
|
-
ticket: 'f145',
|
|
775
|
-
'minus-square': 'f146',
|
|
776
|
-
'minus-square-o': 'f147',
|
|
777
|
-
'level-up': 'f148',
|
|
778
|
-
'level-down': 'f149',
|
|
779
|
-
'check-square': 'f14a',
|
|
780
|
-
'pencil-square': 'f14b',
|
|
781
|
-
'external-link-square': 'f14c',
|
|
782
|
-
'share-square': 'f14d',
|
|
783
|
-
compass: 'f14e',
|
|
784
|
-
'toggle-down,caret-square-o-down': 'f150',
|
|
785
|
-
'toggle-up,caret-square-o-up': 'f151',
|
|
786
|
-
'toggle-right,caret-square-o-right': 'f152',
|
|
787
|
-
'euro,eur': 'f153',
|
|
788
|
-
gbp: 'f154',
|
|
789
|
-
'dollar,usd': 'f155',
|
|
790
|
-
'rupee,inr': 'f156',
|
|
791
|
-
'cny,rmb,yen,jpy': 'f157',
|
|
792
|
-
'ruble,rouble,rub': 'f158',
|
|
793
|
-
'won,krw': 'f159',
|
|
794
|
-
'bitcoin,btc': 'f15a',
|
|
795
|
-
file: 'f15b',
|
|
796
|
-
'file-text': 'f15c',
|
|
797
|
-
'sort-alpha-asc': 'f15d',
|
|
798
|
-
'sort-alpha-desc': 'f15e',
|
|
799
|
-
'sort-amount-asc': 'f160',
|
|
800
|
-
'sort-amount-desc': 'f161',
|
|
801
|
-
'sort-numeric-asc': 'f162',
|
|
802
|
-
'sort-numeric-desc': 'f163',
|
|
803
|
-
'thumbs-up': 'f164',
|
|
804
|
-
'thumbs-down': 'f165',
|
|
805
|
-
'youtube-square': 'f166',
|
|
806
|
-
youtube: 'f167',
|
|
807
|
-
xing: 'f168',
|
|
808
|
-
'xing-square': 'f169',
|
|
809
|
-
'youtube-play': 'f16a',
|
|
810
|
-
dropbox: 'f16b',
|
|
811
|
-
'stack-overflow': 'f16c',
|
|
812
|
-
instagram: 'f16d',
|
|
813
|
-
flickr: 'f16e',
|
|
814
|
-
adn: 'f170',
|
|
815
|
-
bitbucket: 'f171',
|
|
816
|
-
'bitbucket-square': 'f172',
|
|
817
|
-
tumblr: 'f173',
|
|
818
|
-
'tumblr-square': 'f174',
|
|
819
|
-
'long-arrow-down': 'f175',
|
|
820
|
-
'long-arrow-up': 'f176',
|
|
821
|
-
'long-arrow-left': 'f177',
|
|
822
|
-
'long-arrow-right': 'f178',
|
|
823
|
-
apple: 'f179',
|
|
824
|
-
windows: 'f17a',
|
|
825
|
-
android: 'f17b',
|
|
826
|
-
linux: 'f17c',
|
|
827
|
-
dribbble: 'f17d',
|
|
828
|
-
skype: 'f17e',
|
|
829
|
-
foursquare: 'f180',
|
|
830
|
-
trello: 'f181',
|
|
831
|
-
female: 'f182',
|
|
832
|
-
male: 'f183',
|
|
833
|
-
'gittip,gratipay': 'f184',
|
|
834
|
-
'sun-o': 'f185',
|
|
835
|
-
'moon-o': 'f186',
|
|
836
|
-
archive: 'f187',
|
|
837
|
-
bug: 'f188',
|
|
838
|
-
vk: 'f189',
|
|
839
|
-
weibo: 'f18a',
|
|
840
|
-
renren: 'f18b',
|
|
841
|
-
pagelines: 'f18c',
|
|
842
|
-
'stack-exchange': 'f18d',
|
|
843
|
-
'arrow-circle-o-right': 'f18e',
|
|
844
|
-
'arrow-circle-o-left': 'f190',
|
|
845
|
-
'toggle-left,caret-square-o-left': 'f191',
|
|
846
|
-
'dot-circle-o': 'f192',
|
|
847
|
-
wheelchair: 'f193',
|
|
848
|
-
'vimeo-square': 'f194',
|
|
849
|
-
'turkish-lira,try': 'f195',
|
|
850
|
-
'plus-square-o': 'f196',
|
|
851
|
-
'space-shuttle': 'f197',
|
|
852
|
-
slack: 'f198',
|
|
853
|
-
'envelope-square': 'f199',
|
|
854
|
-
wordpress: 'f19a',
|
|
855
|
-
openid: 'f19b',
|
|
856
|
-
'institution,bank,university': 'f19c',
|
|
857
|
-
'mortar-board,graduation-cap': 'f19d',
|
|
858
|
-
yahoo: 'f19e',
|
|
859
|
-
google: 'f1a0',
|
|
860
|
-
reddit: 'f1a1',
|
|
861
|
-
'reddit-square': 'f1a2',
|
|
862
|
-
'stumbleupon-circle': 'f1a3',
|
|
863
|
-
stumbleupon: 'f1a4',
|
|
864
|
-
delicious: 'f1a5',
|
|
865
|
-
digg: 'f1a6',
|
|
866
|
-
'pied-piper-pp': 'f1a7',
|
|
867
|
-
'pied-piper-alt': 'f1a8',
|
|
868
|
-
drupal: 'f1a9',
|
|
869
|
-
joomla: 'f1aa',
|
|
870
|
-
language: 'f1ab',
|
|
871
|
-
fax: 'f1ac',
|
|
872
|
-
building: 'f1ad',
|
|
873
|
-
child: 'f1ae',
|
|
874
|
-
paw: 'f1b0',
|
|
875
|
-
spoon: 'f1b1',
|
|
876
|
-
cube: 'f1b2',
|
|
877
|
-
cubes: 'f1b3',
|
|
878
|
-
behance: 'f1b4',
|
|
879
|
-
'behance-square': 'f1b5',
|
|
880
|
-
steam: 'f1b6',
|
|
881
|
-
'steam-square': 'f1b7',
|
|
882
|
-
recycle: 'f1b8',
|
|
883
|
-
'automobile,car': 'f1b9',
|
|
884
|
-
'cab,taxi': 'f1ba',
|
|
885
|
-
tree: 'f1bb',
|
|
886
|
-
spotify: 'f1bc',
|
|
887
|
-
deviantart: 'f1bd',
|
|
888
|
-
soundcloud: 'f1be',
|
|
889
|
-
database: 'f1c0',
|
|
890
|
-
'file-pdf-o': 'f1c1',
|
|
891
|
-
'file-word-o': 'f1c2',
|
|
892
|
-
'file-excel-o': 'f1c3',
|
|
893
|
-
'file-powerpoint-o': 'f1c4',
|
|
894
|
-
'file-photo-o,file-picture-o,file-image-o': 'f1c5',
|
|
895
|
-
'file-zip-o,file-archive-o': 'f1c6',
|
|
896
|
-
'file-sound-o,file-audio-o': 'f1c7',
|
|
897
|
-
'file-movie-o,file-video-o': 'f1c8',
|
|
898
|
-
'file-code-o': 'f1c9',
|
|
899
|
-
vine: 'f1ca',
|
|
900
|
-
codepen: 'f1cb',
|
|
901
|
-
jsfiddle: 'f1cc',
|
|
902
|
-
'life-bouy,life-buoy,life-saver,support,life-ring': 'f1cd',
|
|
903
|
-
'circle-o-notch': 'f1ce',
|
|
904
|
-
'ra,resistance,rebel': 'f1d0',
|
|
905
|
-
'ge,empire': 'f1d1',
|
|
906
|
-
'git-square': 'f1d2',
|
|
907
|
-
git: 'f1d3',
|
|
908
|
-
'y-combinator-square,yc-square,hacker-news': 'f1d4',
|
|
909
|
-
'tencent-weibo': 'f1d5',
|
|
910
|
-
qq: 'f1d6',
|
|
911
|
-
'wechat,weixin': 'f1d7',
|
|
912
|
-
'send,paper-plane': 'f1d8',
|
|
913
|
-
'send-o,paper-plane-o': 'f1d9',
|
|
914
|
-
history: 'f1da',
|
|
915
|
-
'circle-thin': 'f1db',
|
|
916
|
-
header: 'f1dc',
|
|
917
|
-
paragraph: 'f1dd',
|
|
918
|
-
sliders: 'f1de',
|
|
919
|
-
'share-alt': 'f1e0',
|
|
920
|
-
'share-alt-square': 'f1e1',
|
|
921
|
-
bomb: 'f1e2',
|
|
922
|
-
'soccer-ball-o,futbol-o': 'f1e3',
|
|
923
|
-
tty: 'f1e4',
|
|
924
|
-
binoculars: 'f1e5',
|
|
925
|
-
plug: 'f1e6',
|
|
926
|
-
slideshare: 'f1e7',
|
|
927
|
-
twitch: 'f1e8',
|
|
928
|
-
yelp: 'f1e9',
|
|
929
|
-
'newspaper-o': 'f1ea',
|
|
930
|
-
wifi: 'f1eb',
|
|
931
|
-
calculator: 'f1ec',
|
|
932
|
-
paypal: 'f1ed',
|
|
933
|
-
'google-wallet': 'f1ee',
|
|
934
|
-
'cc-visa': 'f1f0',
|
|
935
|
-
'cc-mastercard': 'f1f1',
|
|
936
|
-
'cc-discover': 'f1f2',
|
|
937
|
-
'cc-amex': 'f1f3',
|
|
938
|
-
'cc-paypal': 'f1f4',
|
|
939
|
-
'cc-stripe': 'f1f5',
|
|
940
|
-
'bell-slash': 'f1f6',
|
|
941
|
-
'bell-slash-o': 'f1f7',
|
|
942
|
-
trash: 'f1f8',
|
|
943
|
-
copyright: 'f1f9',
|
|
944
|
-
at: 'f1fa',
|
|
945
|
-
eyedropper: 'f1fb',
|
|
946
|
-
'paint-brush': 'f1fc',
|
|
947
|
-
'birthday-cake': 'f1fd',
|
|
948
|
-
'area-chart': 'f1fe',
|
|
949
|
-
'pie-chart': 'f200',
|
|
950
|
-
'line-chart': 'f201',
|
|
951
|
-
lastfm: 'f202',
|
|
952
|
-
'lastfm-square': 'f203',
|
|
953
|
-
'toggle-off': 'f204',
|
|
954
|
-
'toggle-on': 'f205',
|
|
955
|
-
bicycle: 'f206',
|
|
956
|
-
bus: 'f207',
|
|
957
|
-
ioxhost: 'f208',
|
|
958
|
-
angellist: 'f209',
|
|
959
|
-
cc: 'f20a',
|
|
960
|
-
'shekel,sheqel,ils': 'f20b',
|
|
961
|
-
meanpath: 'f20c',
|
|
962
|
-
buysellads: 'f20d',
|
|
963
|
-
connectdevelop: 'f20e',
|
|
964
|
-
dashcube: 'f210',
|
|
965
|
-
forumbee: 'f211',
|
|
966
|
-
leanpub: 'f212',
|
|
967
|
-
sellsy: 'f213',
|
|
968
|
-
shirtsinbulk: 'f214',
|
|
969
|
-
simplybuilt: 'f215',
|
|
970
|
-
skyatlas: 'f216',
|
|
971
|
-
'cart-plus': 'f217',
|
|
972
|
-
'cart-arrow-down': 'f218',
|
|
973
|
-
diamond: 'f219',
|
|
974
|
-
ship: 'f21a',
|
|
975
|
-
'user-secret': 'f21b',
|
|
976
|
-
motorcycle: 'f21c',
|
|
977
|
-
'street-view': 'f21d',
|
|
978
|
-
heartbeat: 'f21e',
|
|
979
|
-
venus: 'f221',
|
|
980
|
-
mars: 'f222',
|
|
981
|
-
mercury: 'f223',
|
|
982
|
-
'intersex,transgender': 'f224',
|
|
983
|
-
'transgender-alt': 'f225',
|
|
984
|
-
'venus-double': 'f226',
|
|
985
|
-
'mars-double': 'f227',
|
|
986
|
-
'venus-mars': 'f228',
|
|
987
|
-
'mars-stroke': 'f229',
|
|
988
|
-
'mars-stroke-v': 'f22a',
|
|
989
|
-
'mars-stroke-h': 'f22b',
|
|
990
|
-
neuter: 'f22c',
|
|
991
|
-
genderless: 'f22d',
|
|
992
|
-
'facebook-official': 'f230',
|
|
993
|
-
'pinterest-p': 'f231',
|
|
994
|
-
whatsapp: 'f232',
|
|
995
|
-
server: 'f233',
|
|
996
|
-
'user-plus': 'f234',
|
|
997
|
-
'user-times': 'f235',
|
|
998
|
-
'hotel,bed': 'f236',
|
|
999
|
-
viacoin: 'f237',
|
|
1000
|
-
train: 'f238',
|
|
1001
|
-
subway: 'f239',
|
|
1002
|
-
medium: 'f23a',
|
|
1003
|
-
'yc,y-combinator': 'f23b',
|
|
1004
|
-
'optin-monster': 'f23c',
|
|
1005
|
-
opencart: 'f23d',
|
|
1006
|
-
expeditedssl: 'f23e',
|
|
1007
|
-
'battery-4,battery-full': 'f240',
|
|
1008
|
-
'battery-3,battery-three-quarters': 'f241',
|
|
1009
|
-
'battery-2,battery-half': 'f242',
|
|
1010
|
-
'battery-1,battery-quarter': 'f243',
|
|
1011
|
-
'battery-0,battery-empty': 'f244',
|
|
1012
|
-
'mouse-pointer': 'f245',
|
|
1013
|
-
'i-cursor': 'f246',
|
|
1014
|
-
'object-group': 'f247',
|
|
1015
|
-
'object-ungroup': 'f248',
|
|
1016
|
-
'sticky-note': 'f249',
|
|
1017
|
-
'sticky-note-o': 'f24a',
|
|
1018
|
-
'cc-jcb': 'f24b',
|
|
1019
|
-
'cc-diners-club': 'f24c',
|
|
1020
|
-
clone: 'f24d',
|
|
1021
|
-
'balance-scale': 'f24e',
|
|
1022
|
-
'hourglass-o': 'f250',
|
|
1023
|
-
'hourglass-1,hourglass-start': 'f251',
|
|
1024
|
-
'hourglass-2,hourglass-half': 'f252',
|
|
1025
|
-
'hourglass-3,hourglass-end': 'f253',
|
|
1026
|
-
hourglass: 'f254',
|
|
1027
|
-
'hand-grab-o,hand-rock-o': 'f255',
|
|
1028
|
-
'hand-stop-o,hand-paper-o': 'f256',
|
|
1029
|
-
'hand-scissors-o': 'f257',
|
|
1030
|
-
'hand-lizard-o': 'f258',
|
|
1031
|
-
'hand-spock-o': 'f259',
|
|
1032
|
-
'hand-pointer-o': 'f25a',
|
|
1033
|
-
'hand-peace-o': 'f25b',
|
|
1034
|
-
trademark: 'f25c',
|
|
1035
|
-
registered: 'f25d',
|
|
1036
|
-
'creative-commons': 'f25e',
|
|
1037
|
-
gg: 'f260',
|
|
1038
|
-
'gg-circle': 'f261',
|
|
1039
|
-
tripadvisor: 'f262',
|
|
1040
|
-
odnoklassniki: 'f263',
|
|
1041
|
-
'odnoklassniki-square': 'f264',
|
|
1042
|
-
'get-pocket': 'f265',
|
|
1043
|
-
'wikipedia-w': 'f266',
|
|
1044
|
-
safari: 'f267',
|
|
1045
|
-
chrome: 'f268',
|
|
1046
|
-
firefox: 'f269',
|
|
1047
|
-
opera: 'f26a',
|
|
1048
|
-
'internet-explorer': 'f26b',
|
|
1049
|
-
'tv,television': 'f26c',
|
|
1050
|
-
contao: 'f26d',
|
|
1051
|
-
'500px': 'f26e',
|
|
1052
|
-
amazon: 'f270',
|
|
1053
|
-
'calendar-plus-o': 'f271',
|
|
1054
|
-
'calendar-minus-o': 'f272',
|
|
1055
|
-
'calendar-times-o': 'f273',
|
|
1056
|
-
'calendar-check-o': 'f274',
|
|
1057
|
-
industry: 'f275',
|
|
1058
|
-
'map-pin': 'f276',
|
|
1059
|
-
'map-signs': 'f277',
|
|
1060
|
-
'map-o': 'f278',
|
|
1061
|
-
map: 'f279',
|
|
1062
|
-
commenting: 'f27a',
|
|
1063
|
-
'commenting-o': 'f27b',
|
|
1064
|
-
houzz: 'f27c',
|
|
1065
|
-
vimeo: 'f27d',
|
|
1066
|
-
'black-tie': 'f27e',
|
|
1067
|
-
fonticons: 'f280',
|
|
1068
|
-
'reddit-alien': 'f281',
|
|
1069
|
-
edge: 'f282',
|
|
1070
|
-
'credit-card-alt': 'f283',
|
|
1071
|
-
codiepie: 'f284',
|
|
1072
|
-
modx: 'f285',
|
|
1073
|
-
'fort-awesome': 'f286',
|
|
1074
|
-
usb: 'f287',
|
|
1075
|
-
'product-hunt': 'f288',
|
|
1076
|
-
mixcloud: 'f289',
|
|
1077
|
-
scribd: 'f28a',
|
|
1078
|
-
'pause-circle': 'f28b',
|
|
1079
|
-
'pause-circle-o': 'f28c',
|
|
1080
|
-
'stop-circle': 'f28d',
|
|
1081
|
-
'stop-circle-o': 'f28e',
|
|
1082
|
-
'shopping-bag': 'f290',
|
|
1083
|
-
'shopping-basket': 'f291',
|
|
1084
|
-
hashtag: 'f292',
|
|
1085
|
-
bluetooth: 'f293',
|
|
1086
|
-
'bluetooth-b': 'f294',
|
|
1087
|
-
percent: 'f295',
|
|
1088
|
-
gitlab: 'f296',
|
|
1089
|
-
wpbeginner: 'f297',
|
|
1090
|
-
wpforms: 'f298',
|
|
1091
|
-
envira: 'f299',
|
|
1092
|
-
'universal-access': 'f29a',
|
|
1093
|
-
'wheelchair-alt': 'f29b',
|
|
1094
|
-
'question-circle-o': 'f29c',
|
|
1095
|
-
blind: 'f29d',
|
|
1096
|
-
'audio-description': 'f29e',
|
|
1097
|
-
'volume-control-phone': 'f2a0',
|
|
1098
|
-
braille: 'f2a1',
|
|
1099
|
-
'assistive-listening-systems': 'f2a2',
|
|
1100
|
-
'asl-interpreting,american-sign-language-interpreting': 'f2a3',
|
|
1101
|
-
'deafness,hard-of-hearing,deaf': 'f2a4',
|
|
1102
|
-
glide: 'f2a5',
|
|
1103
|
-
'glide-g': 'f2a6',
|
|
1104
|
-
'signing,sign-language': 'f2a7',
|
|
1105
|
-
'low-vision': 'f2a8',
|
|
1106
|
-
viadeo: 'f2a9',
|
|
1107
|
-
'viadeo-square': 'f2aa',
|
|
1108
|
-
snapchat: 'f2ab',
|
|
1109
|
-
'snapchat-ghost': 'f2ac',
|
|
1110
|
-
'snapchat-square': 'f2ad',
|
|
1111
|
-
'pied-piper': 'f2ae',
|
|
1112
|
-
'first-order': 'f2b0',
|
|
1113
|
-
yoast: 'f2b1',
|
|
1114
|
-
themeisle: 'f2b2',
|
|
1115
|
-
'google-plus-circle,google-plus-official': 'f2b3',
|
|
1116
|
-
'fa,font-awesome': 'f2b4'
|
|
1117
|
-
}
|
|
1118
|
-
}
|
|
1119
|
-
|
|
1120
465
|
icon(d) {
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
if (this.options.iconMap && this.options.showIcons && this.options.icons) {
|
|
1124
|
-
if (this.options.icons[d.labels[0]] && this.options.iconMap[this.options.icons[d.labels[0]]]) {
|
|
1125
|
-
code = this.options.iconMap[this.options.icons[d.labels[0]]]
|
|
1126
|
-
} else if (this.options.iconMap[d.labels[0]]) {
|
|
1127
|
-
code = this.options.iconMap[d.labels[0]]
|
|
1128
|
-
} else if (this.options.icons[d.labels[0]]) {
|
|
1129
|
-
code = this.options.icons[d.labels[0]]
|
|
1130
|
-
}
|
|
1131
|
-
}
|
|
1132
|
-
|
|
1133
|
-
return code
|
|
466
|
+
return d.icon
|
|
1134
467
|
}
|
|
1135
468
|
|
|
1136
469
|
image(d) {
|
|
@@ -1174,8 +507,6 @@ export class GraphViewer {
|
|
|
1174
507
|
}
|
|
1175
508
|
|
|
1176
509
|
init(_selector, _options) {
|
|
1177
|
-
this.initIconMap()
|
|
1178
|
-
|
|
1179
510
|
this.merge(this.options, _options)
|
|
1180
511
|
|
|
1181
512
|
if (this.options.icons) {
|
|
@@ -1186,8 +517,6 @@ export class GraphViewer {
|
|
|
1186
517
|
this.options.minCollision = this.options.nodeRadius * 2
|
|
1187
518
|
}
|
|
1188
519
|
|
|
1189
|
-
this.initImageMap()
|
|
1190
|
-
|
|
1191
520
|
this.selector = _selector
|
|
1192
521
|
|
|
1193
522
|
this.container = d3.select(this.selector)
|
|
@@ -1211,43 +540,12 @@ export class GraphViewer {
|
|
|
1211
540
|
}
|
|
1212
541
|
}
|
|
1213
542
|
|
|
1214
|
-
initIconMap() {
|
|
1215
|
-
Object.keys(this.options.iconMap).forEach((key, index) => {
|
|
1216
|
-
var keys = key.split(','),
|
|
1217
|
-
value = this.options.iconMap[key]
|
|
1218
|
-
|
|
1219
|
-
keys.forEach(key => {
|
|
1220
|
-
this.options.iconMap[key] = value
|
|
1221
|
-
})
|
|
1222
|
-
})
|
|
1223
|
-
}
|
|
1224
|
-
|
|
1225
|
-
initImageMap() {
|
|
1226
|
-
var key, keys, selector
|
|
1227
|
-
const images = this.options.images as any
|
|
1228
|
-
|
|
1229
|
-
for (key in images) {
|
|
1230
|
-
if (images.hasOwnProperty(key)) {
|
|
1231
|
-
keys = key.split('|')
|
|
1232
|
-
|
|
1233
|
-
if (!this.options.imageMap[keys[0]]) {
|
|
1234
|
-
this.options.imageMap[keys[0]] = [key]
|
|
1235
|
-
} else {
|
|
1236
|
-
this.options.imageMap[keys[0]].push(key)
|
|
1237
|
-
}
|
|
1238
|
-
}
|
|
1239
|
-
}
|
|
1240
|
-
}
|
|
1241
|
-
|
|
1242
543
|
initSimulation() {
|
|
1243
544
|
const x = this.svg.node().parentElement.parentElement.clientWidth / 2
|
|
1244
545
|
const y = this.svg.node().parentElement.parentElement.clientHeight / 2
|
|
1245
546
|
|
|
1246
547
|
var simulation = d3
|
|
1247
548
|
.forceSimulation()
|
|
1248
|
-
// .velocityDecay(0.8)
|
|
1249
|
-
// .force('x', d3.force().strength(0.002))
|
|
1250
|
-
// .force('y', d3.force().strength(0.002))
|
|
1251
549
|
.force(
|
|
1252
550
|
'collide',
|
|
1253
551
|
d3
|
|
@@ -1434,31 +732,8 @@ export class GraphViewer {
|
|
|
1434
732
|
relationships: this.relationships.length
|
|
1435
733
|
}
|
|
1436
734
|
}
|
|
1437
|
-
/*
|
|
1438
|
-
function smoothTransform(elem, translate, scale) {
|
|
1439
|
-
var animationMilliseconds = 5000,
|
|
1440
|
-
timeoutMilliseconds = 50,
|
|
1441
|
-
steps = parseInt(animationMilliseconds / timeoutMilliseconds);
|
|
1442
|
-
|
|
1443
|
-
setTimeout(function() {
|
|
1444
|
-
smoothTransformStep(elem, translate, scale, timeoutMilliseconds, 1, steps);
|
|
1445
|
-
}, timeoutMilliseconds);
|
|
1446
|
-
}
|
|
1447
|
-
|
|
1448
|
-
function smoothTransformStep(elem, translate, scale, timeoutMilliseconds, step, steps) {
|
|
1449
|
-
var progress = step / steps;
|
|
1450
|
-
|
|
1451
|
-
elem.attr('transform', 'translate(' + (translate[0] * progress) + ', ' + (translate[1] * progress) + ') scale(' + (scale * progress) + ')');
|
|
1452
|
-
|
|
1453
|
-
if (step < steps) {
|
|
1454
|
-
setTimeout(function() {
|
|
1455
|
-
smoothTransformStep(elem, translate, scale, timeoutMilliseconds, step + 1, steps);
|
|
1456
|
-
}, timeoutMilliseconds);
|
|
1457
|
-
}
|
|
1458
|
-
}
|
|
1459
|
-
*/
|
|
1460
735
|
|
|
1461
|
-
stickNode(
|
|
736
|
+
stickNode(event, d) {
|
|
1462
737
|
d.fx = event.x
|
|
1463
738
|
d.fy = event.y
|
|
1464
739
|
}
|
|
@@ -1807,6 +1082,5 @@ export class GraphViewer {
|
|
|
1807
1082
|
'transform',
|
|
1808
1083
|
'translate(' + this.svgTranslate[0] + ', ' + this.svgTranslate[1] + ') scale(' + this.svgScale + ')'
|
|
1809
1084
|
)
|
|
1810
|
-
// smoothTransform(this.svgTranslate, this.svgScale);
|
|
1811
1085
|
}
|
|
1812
1086
|
}
|