@rxap/layout 18.0.2 → 18.0.3-dev.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/CHANGELOG.md +8 -0
- package/README.md +14 -1
- package/compodoc/changelog.html +732 -0
- package/compodoc/components/AppsButtonComponent.html +604 -0
- package/compodoc/components/FooterComponent.html +487 -0
- package/compodoc/components/HeaderComponent.html +781 -0
- package/compodoc/components/LanguageSelectorComponent.html +526 -0
- package/compodoc/components/LayoutComponent.html +1035 -0
- package/compodoc/components/NavigationComponent.html +1156 -0
- package/compodoc/components/NavigationItemComponent.html +1328 -0
- package/compodoc/components/NavigationProgressBarComponent.html +550 -0
- package/compodoc/components/ResetButtonComponent.html +486 -0
- package/compodoc/components/SettingsButtonComponent.html +1416 -0
- package/compodoc/components/SidenavComponent.html +689 -0
- package/compodoc/components/SidenavToggleButtonComponent.html +517 -0
- package/compodoc/components/SignOutComponent.html +493 -0
- package/compodoc/components/ToggleWindowSidenavButtonComponent.html +549 -0
- package/compodoc/components/UserProfileIconComponent.html +657 -0
- package/compodoc/components/VersionComponent.html +524 -0
- package/compodoc/components/WindowContainerSidenavComponent.html +687 -0
- package/compodoc/dependencies.html +241 -0
- package/compodoc/directives/FooterDirective.html +371 -0
- package/compodoc/directives/SidenavFooterDirective.html +387 -0
- package/compodoc/directives/SidenavHeaderDirective.html +387 -0
- package/compodoc/fonts/ionicons.eot +0 -0
- package/compodoc/fonts/ionicons.svg +2090 -0
- package/compodoc/fonts/ionicons.ttf +0 -0
- package/compodoc/fonts/ionicons.woff +0 -0
- package/compodoc/fonts/ionicons.woff2 +0 -0
- package/compodoc/fonts/roboto-v15-latin-300.eot +0 -0
- package/compodoc/fonts/roboto-v15-latin-300.svg +314 -0
- package/compodoc/fonts/roboto-v15-latin-300.ttf +0 -0
- package/compodoc/fonts/roboto-v15-latin-300.woff +0 -0
- package/compodoc/fonts/roboto-v15-latin-300.woff2 +0 -0
- package/compodoc/fonts/roboto-v15-latin-700.eot +0 -0
- package/compodoc/fonts/roboto-v15-latin-700.svg +310 -0
- package/compodoc/fonts/roboto-v15-latin-700.ttf +0 -0
- package/compodoc/fonts/roboto-v15-latin-700.woff +0 -0
- package/compodoc/fonts/roboto-v15-latin-700.woff2 +0 -0
- package/compodoc/fonts/roboto-v15-latin-italic.eot +0 -0
- package/compodoc/fonts/roboto-v15-latin-italic.svg +323 -0
- package/compodoc/fonts/roboto-v15-latin-italic.ttf +0 -0
- package/compodoc/fonts/roboto-v15-latin-italic.woff +0 -0
- package/compodoc/fonts/roboto-v15-latin-italic.woff2 +0 -0
- package/compodoc/fonts/roboto-v15-latin-regular.eot +0 -0
- package/compodoc/fonts/roboto-v15-latin-regular.svg +308 -0
- package/compodoc/fonts/roboto-v15-latin-regular.ttf +0 -0
- package/compodoc/fonts/roboto-v15-latin-regular.woff +0 -0
- package/compodoc/fonts/roboto-v15-latin-regular.woff2 +0 -0
- package/compodoc/graph/dependencies.svg +24 -0
- package/compodoc/images/compodoc-vectorise-inverted.png +0 -0
- package/compodoc/images/compodoc-vectorise-inverted.svg +201 -0
- package/compodoc/images/compodoc-vectorise.png +0 -0
- package/compodoc/images/compodoc-vectorise.svg +201 -0
- package/compodoc/images/favicon.ico +0 -0
- package/compodoc/index.html +197 -0
- package/compodoc/injectables/AppUrlService.html +829 -0
- package/compodoc/injectables/AuthenticationServiceMock.html +303 -0
- package/compodoc/injectables/LayoutComponentService.html +848 -0
- package/compodoc/injectables/NavigationService.html +1081 -0
- package/compodoc/injectables/ReplaceRouterPathsService.html +337 -0
- package/compodoc/injectables/SidenavComponentService.html +408 -0
- package/compodoc/interfaces/ExternalApps.html +634 -0
- package/compodoc/interfaces/LogoConfig.html +381 -0
- package/compodoc/interfaces/NavigationDividerItem.html +385 -0
- package/compodoc/interfaces/NavigationInsertItem.html +340 -0
- package/compodoc/interfaces/NavigationItem.html +520 -0
- package/compodoc/interfaces/NavigationStatus.html +376 -0
- package/compodoc/js/compodoc.js +14 -0
- package/compodoc/js/lazy-load-graphs.js +44 -0
- package/compodoc/js/libs/EventDispatcher.js +5 -0
- package/compodoc/js/libs/bootstrap-native.js +2 -0
- package/compodoc/js/libs/clipboard.min.js +7 -0
- package/compodoc/js/libs/custom-elements-es5-adapter.js +15 -0
- package/compodoc/js/libs/custom-elements.min.js +38 -0
- package/compodoc/js/libs/d3.v3.min.js +2 -0
- package/compodoc/js/libs/deep-iterator.js +2 -0
- package/compodoc/js/libs/es6-shim.min.js +12 -0
- package/compodoc/js/libs/htmlparser.js +23 -0
- package/compodoc/js/libs/innersvg.js +9 -0
- package/compodoc/js/libs/lit-html.js +1 -0
- package/compodoc/js/libs/prism.js +46 -0
- package/compodoc/js/libs/promise.min.js +6 -0
- package/compodoc/js/libs/svg-pan-zoom.min.js +3 -0
- package/compodoc/js/libs/tablesort.min.js +6 -0
- package/compodoc/js/libs/tablesort.number.min.js +6 -0
- package/compodoc/js/libs/vis.min.js +47 -0
- package/compodoc/js/libs/zepto.min.js +2 -0
- package/compodoc/js/menu-wc.js +237 -0
- package/compodoc/js/menu-wc_es5.js +40 -0
- package/compodoc/js/menu.js +270 -0
- package/compodoc/js/routes.js +301 -0
- package/compodoc/js/search/lunr.min.js +6 -0
- package/compodoc/js/search/search-lunr.js +67 -0
- package/compodoc/js/search/search.js +283 -0
- package/compodoc/js/search/search_index.js +4 -0
- package/compodoc/js/sourceCode.js +58 -0
- package/compodoc/js/svg-pan-zoom.controls.js +53 -0
- package/compodoc/js/tabs.js +21 -0
- package/compodoc/js/tree.js +147 -0
- package/compodoc/license.html +731 -0
- package/compodoc/miscellaneous/functions.html +460 -0
- package/compodoc/miscellaneous/typealiases.html +256 -0
- package/compodoc/miscellaneous/variables.html +370 -0
- package/compodoc/modules.html +183 -0
- package/compodoc/overview.html +225 -0
- package/compodoc/pipes/ReplaceRouterPathsPipe.html +363 -0
- package/compodoc/properties.html +195 -0
- package/compodoc/styles/bootstrap-card.css +219 -0
- package/compodoc/styles/bootstrap.min.css +6 -0
- package/compodoc/styles/compodoc.css +1124 -0
- package/compodoc/styles/dark.css +121 -0
- package/compodoc/styles/ionicons.min.css +11 -0
- package/compodoc/styles/laravel.css +113 -0
- package/compodoc/styles/material.css +131 -0
- package/compodoc/styles/original.css +51 -0
- package/compodoc/styles/postmark.css +238 -0
- package/compodoc/styles/prism.css +301 -0
- package/compodoc/styles/readthedocs.css +117 -0
- package/compodoc/styles/reset.css +129 -0
- package/compodoc/styles/stripe.css +106 -0
- package/compodoc/styles/style.css +7 -0
- package/compodoc/styles/tablesort.css +33 -0
- package/compodoc/styles/vagrant.css +130 -0
- package/docs/.nojekyll +1 -0
- package/docs/assets/highlight.css +43 -0
- package/docs/assets/icons.js +15 -0
- package/docs/assets/icons.svg +1 -0
- package/docs/assets/main.js +59 -0
- package/docs/assets/navigation.js +1 -0
- package/docs/assets/search.js +1 -0
- package/docs/assets/style.css +1412 -0
- package/docs/classes/AppUrlService.html +13 -0
- package/docs/classes/AppsButtonComponent.html +9 -0
- package/docs/classes/AuthenticationServiceMock.html +3 -0
- package/docs/classes/FooterComponent.html +3 -0
- package/docs/classes/FooterDirective.html +8 -0
- package/docs/classes/HeaderComponent.html +8 -0
- package/docs/classes/LanguageSelectorComponent.html +3 -0
- package/docs/classes/LayoutComponent.html +18 -0
- package/docs/classes/LayoutComponentService.html +15 -0
- package/docs/classes/NavigationComponent.html +15 -0
- package/docs/classes/NavigationItemComponent.html +22 -0
- package/docs/classes/NavigationProgressBarComponent.html +4 -0
- package/docs/classes/NavigationService.html +17 -0
- package/docs/classes/ReplaceRouterPathsPipe.html +4 -0
- package/docs/classes/ReplaceRouterPathsService.html +3 -0
- package/docs/classes/ResetButtonComponent.html +3 -0
- package/docs/classes/SettingsButtonComponent.html +30 -0
- package/docs/classes/SidenavComponent.html +5 -0
- package/docs/classes/SidenavComponentService.html +5 -0
- package/docs/classes/SidenavFooterDirective.html +3 -0
- package/docs/classes/SidenavHeaderDirective.html +3 -0
- package/docs/classes/SidenavToggleButtonComponent.html +4 -0
- package/docs/classes/SignOutComponent.html +4 -0
- package/docs/classes/ToggleWindowSidenavButtonComponent.html +5 -0
- package/docs/classes/UserProfileIconComponent.html +6 -0
- package/docs/classes/VersionComponent.html +7 -0
- package/docs/classes/WindowContainerSidenavComponent.html +10 -0
- package/docs/documentation.json +13308 -0
- package/docs/functions/IsNavigationDividerItem.html +1 -0
- package/docs/functions/IsNavigationInsertItem.html +1 -0
- package/docs/functions/IsNavigationItem.html +1 -0
- package/docs/index.html +25 -0
- package/docs/interfaces/ExternalApps.html +8 -0
- package/docs/interfaces/LogoConfig.html +4 -0
- package/docs/interfaces/NavigationDividerItem.html +3 -0
- package/docs/interfaces/NavigationInsertItem.html +2 -0
- package/docs/interfaces/NavigationItem.html +6 -0
- package/docs/interfaces/NavigationStatus.html +2 -0
- package/docs/modules.html +47 -0
- package/docs/types/ExtractUsernameFromProfileFn.html +1 -0
- package/docs/types/Navigation.html +1 -0
- package/docs/types/NavigationWithInserts.html +1 -0
- package/docs/variables/EXTRACT_USERNAME_FROM_PROFILE.html +1 -0
- package/docs/variables/RXAP_FOOTER_COMPONENT.html +1 -0
- package/docs/variables/RXAP_HEADER_COMPONENT.html +1 -0
- package/docs/variables/RXAP_LAYOUT_APPS_GRID.html +1 -0
- package/docs/variables/RXAP_LOGO_CONFIG.html +1 -0
- package/docs/variables/RXAP_NAVIGATION_CONFIG.html +1 -0
- package/docs/variables/RXAP_NAVIGATION_CONFIG_INSERTS.html +1 -0
- package/package.json +46 -44
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
document.addEventListener('DOMContentLoaded', function() {
|
|
2
|
+
var $tabSource = document.querySelector('#source-tab'),
|
|
3
|
+
$tabInfo = document.querySelector('#info-tab'),
|
|
4
|
+
$tabReadme = document.querySelector('#readme-tab'),
|
|
5
|
+
$tabTemplate = document.querySelector('#templateData-tab'),
|
|
6
|
+
$tabTree = document.querySelector('#tree-tab'),
|
|
7
|
+
$tabExample = document.querySelector('#example-tab'),
|
|
8
|
+
$prismPre = document.querySelector('pre.compodoc-sourcecode');
|
|
9
|
+
if ($tabSource && $prismPre) {
|
|
10
|
+
$prismCode = $prismPre.querySelector('code'),
|
|
11
|
+
$content = document.querySelector('.content'),
|
|
12
|
+
prismLinks = document.querySelectorAll('.link-to-prism')
|
|
13
|
+
|
|
14
|
+
for (var i = 0; i < prismLinks.length; i++) {
|
|
15
|
+
prismLinks[i].addEventListener('click', linkToPrism, false);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
function linkToPrism(event) {
|
|
19
|
+
var targetLine = event.target.getAttribute('data-line');
|
|
20
|
+
event.preventDefault();
|
|
21
|
+
|
|
22
|
+
$prismPre.setAttribute('data-line', targetLine);
|
|
23
|
+
Prism.highlightElement($prismCode, function() {});
|
|
24
|
+
|
|
25
|
+
$tabSource.click();
|
|
26
|
+
|
|
27
|
+
setTimeout(function() {
|
|
28
|
+
var $prismHighlightLine = document.querySelector('.line-highlight'),
|
|
29
|
+
top = parseInt(getComputedStyle($prismHighlightLine)['top']);
|
|
30
|
+
$content.scrollTop = top;
|
|
31
|
+
}, 500);
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
window.onhashchange = function(event) {
|
|
35
|
+
switch (window.location.hash) {
|
|
36
|
+
case '':
|
|
37
|
+
case '#info':
|
|
38
|
+
$tabInfo.click();
|
|
39
|
+
break;
|
|
40
|
+
case '#readme':
|
|
41
|
+
$tabReadme.click();
|
|
42
|
+
break;
|
|
43
|
+
case '#source':
|
|
44
|
+
$tabSource.click();
|
|
45
|
+
break;
|
|
46
|
+
case '#template':
|
|
47
|
+
$tabTemplate.click();
|
|
48
|
+
break;
|
|
49
|
+
case '#dom-tree':
|
|
50
|
+
$tabTree.click();
|
|
51
|
+
break;
|
|
52
|
+
case '#example':
|
|
53
|
+
$tabExample.click();
|
|
54
|
+
break;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
});
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
document.addEventListener('DOMContentLoaded', function() {
|
|
2
|
+
if (document.getElementById('module-graph-svg')) {
|
|
3
|
+
panZoom = svgPanZoom(document.getElementById('module-graph-svg').querySelector('svg'), {
|
|
4
|
+
zoomEnabled: true,
|
|
5
|
+
minZoom: 1,
|
|
6
|
+
maxZoom: 5
|
|
7
|
+
});
|
|
8
|
+
|
|
9
|
+
document.getElementById('zoom-in').addEventListener('click', function(ev) {
|
|
10
|
+
ev.preventDefault();
|
|
11
|
+
panZoom.zoomIn();
|
|
12
|
+
});
|
|
13
|
+
|
|
14
|
+
document.getElementById('zoom-out').addEventListener('click', function(ev) {
|
|
15
|
+
ev.preventDefault();
|
|
16
|
+
panZoom.zoomOut();
|
|
17
|
+
});
|
|
18
|
+
|
|
19
|
+
document.getElementById('reset').addEventListener('click', function(ev) {
|
|
20
|
+
ev.preventDefault();
|
|
21
|
+
panZoom.resetZoom();
|
|
22
|
+
panZoom.resetPan();
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
var overviewFullscreen = false,
|
|
26
|
+
originalOverviewHeight;
|
|
27
|
+
|
|
28
|
+
document.getElementById('fullscreen').addEventListener('click', function(ev) {
|
|
29
|
+
if (overviewFullscreen) {
|
|
30
|
+
document.getElementById('module-graph-svg').style.height = originalOverviewHeight;
|
|
31
|
+
overviewFullscreen = false;
|
|
32
|
+
if (ev.target) {
|
|
33
|
+
ev.target.classList.remove('ion-md-close');
|
|
34
|
+
ev.target.classList.add('ion-ios-resize');
|
|
35
|
+
}
|
|
36
|
+
} else {
|
|
37
|
+
originalOverviewHeight = document.getElementById('module-graph-svg').style.height;
|
|
38
|
+
document.getElementById('module-graph-svg').style.height = '85vh';
|
|
39
|
+
overviewFullscreen = true;
|
|
40
|
+
if (ev.target) {
|
|
41
|
+
ev.target.classList.remove('ion-ios-resize');
|
|
42
|
+
ev.target.classList.add('ion-md-close');
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
document.getElementById('module-graph-svg').querySelector('svg').style.height = document.getElementById('module-graph-svg').clientHeight;
|
|
46
|
+
setTimeout(function() {
|
|
47
|
+
panZoom.resize();
|
|
48
|
+
panZoom.fit();
|
|
49
|
+
panZoom.center();
|
|
50
|
+
}, 0)
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
});
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
document.addEventListener('DOMContentLoaded', function() {
|
|
2
|
+
var tabs = document.getElementsByClassName('nav-tabs'),
|
|
3
|
+
updateAddress = function(e) {
|
|
4
|
+
if(history.pushState && e.target.dataset.link) {
|
|
5
|
+
history.pushState(null, null, '#' + e.target.dataset.link);
|
|
6
|
+
}
|
|
7
|
+
};
|
|
8
|
+
if (tabs.length > 0) {
|
|
9
|
+
tabs = tabs[0].querySelectorAll('li');
|
|
10
|
+
for (var i = 0; i < tabs.length; i++) {
|
|
11
|
+
tabs[i].addEventListener('click', updateAddress);
|
|
12
|
+
var linkTag = tabs[i].querySelector('a');
|
|
13
|
+
if (location.hash !== '') {
|
|
14
|
+
var currentHash = location.hash.substr(1);
|
|
15
|
+
if (currentHash === linkTag.dataset.link) {
|
|
16
|
+
linkTag.click();
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
});
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
document.addEventListener('DOMContentLoaded', function() {
|
|
2
|
+
var tabs = document.getElementsByClassName('nav-tabs')[0],
|
|
3
|
+
tabsCollection = tabs.getElementsByTagName('A'),
|
|
4
|
+
treeTab;
|
|
5
|
+
var len = tabsCollection.length;
|
|
6
|
+
for(var i = 0; i < len; i++) {
|
|
7
|
+
if (tabsCollection[i].getAttribute('id') === 'tree-tab') {
|
|
8
|
+
treeTab = tabsCollection[i];
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
// short-circuit if no tree tab
|
|
13
|
+
if (!treeTab) return;
|
|
14
|
+
|
|
15
|
+
var handler = new Tautologistics.NodeHtmlParser.HtmlBuilder(function(error, dom) {
|
|
16
|
+
if (error) {
|
|
17
|
+
console.log('handler ko');
|
|
18
|
+
}
|
|
19
|
+
}),
|
|
20
|
+
parser = new Tautologistics.NodeHtmlParser.Parser(handler),
|
|
21
|
+
currentLocation = window.location;
|
|
22
|
+
parser.parseComplete(COMPONENT_TEMPLATE);
|
|
23
|
+
|
|
24
|
+
var newNodes = [],
|
|
25
|
+
newEdges = [],
|
|
26
|
+
parsedHtml = handler.dom[0],
|
|
27
|
+
nodeCount = 0,
|
|
28
|
+
nodeLevel = 0;
|
|
29
|
+
|
|
30
|
+
newNodes.push({
|
|
31
|
+
_id: 0,
|
|
32
|
+
label: parsedHtml.name,
|
|
33
|
+
type: parsedHtml.type
|
|
34
|
+
})
|
|
35
|
+
//Add id for nodes
|
|
36
|
+
var traverseIds = function(o) {
|
|
37
|
+
for (i in o) {
|
|
38
|
+
if (!!o[i] && typeof(o[i]) == "object") {
|
|
39
|
+
if (!o[i].length && o[i].type === 'tag') {
|
|
40
|
+
nodeCount += 1;
|
|
41
|
+
o[i]._id = nodeCount;
|
|
42
|
+
}
|
|
43
|
+
traverseIds(o[i]);
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
parsedHtml._id = 0;
|
|
48
|
+
traverseIds(parsedHtml);
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
var DeepIterator = deepIterator.default,
|
|
52
|
+
it = DeepIterator(parsedHtml);
|
|
53
|
+
for (let {
|
|
54
|
+
value,
|
|
55
|
+
parent,
|
|
56
|
+
parentNode,
|
|
57
|
+
key,
|
|
58
|
+
type
|
|
59
|
+
} of it) {
|
|
60
|
+
if (type === 'NonIterableObject' && typeof key !== 'undefined' && value.type === 'tag') {
|
|
61
|
+
var newNode = {
|
|
62
|
+
id: value._id,
|
|
63
|
+
label: value.name,
|
|
64
|
+
type: value.type
|
|
65
|
+
};
|
|
66
|
+
for(var i = 0; i < COMPONENTS.length; i++) {
|
|
67
|
+
if (COMPONENTS[i].selector === value.name) {
|
|
68
|
+
newNode.font = {
|
|
69
|
+
multi: 'html'
|
|
70
|
+
};
|
|
71
|
+
newNode.label = '<b>' + newNode.label + '</b>';
|
|
72
|
+
newNode.color = '#FB7E81';
|
|
73
|
+
newNode.name = COMPONENTS[i].name;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
for(var i = 0; i < DIRECTIVES.length; i++) {
|
|
77
|
+
if (value.attributes) {
|
|
78
|
+
for(attr in value.attributes) {
|
|
79
|
+
if (DIRECTIVES[i].selector.indexOf(attr) !== -1) {
|
|
80
|
+
newNode.font = {
|
|
81
|
+
multi: 'html'
|
|
82
|
+
};
|
|
83
|
+
newNode.label = '<b>' + newNode.label + '</b>';
|
|
84
|
+
newNode.color = '#FF9800';
|
|
85
|
+
newNode.name = DIRECTIVES[i].name;
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
newNodes.push(newNode);
|
|
91
|
+
newEdges.push({
|
|
92
|
+
from: parentNode._parent._id,
|
|
93
|
+
to: value._id,
|
|
94
|
+
arrows: 'to'
|
|
95
|
+
});
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
newNodes.shift();
|
|
100
|
+
|
|
101
|
+
var container = document.getElementById('tree-container'),
|
|
102
|
+
data = {
|
|
103
|
+
nodes: newNodes,
|
|
104
|
+
edges: newEdges
|
|
105
|
+
},
|
|
106
|
+
options = {
|
|
107
|
+
layout: {
|
|
108
|
+
hierarchical: {
|
|
109
|
+
sortMethod: 'directed',
|
|
110
|
+
enabled: true
|
|
111
|
+
}
|
|
112
|
+
},
|
|
113
|
+
nodes: {
|
|
114
|
+
shape: 'ellipse',
|
|
115
|
+
fixed: true
|
|
116
|
+
}
|
|
117
|
+
},
|
|
118
|
+
|
|
119
|
+
handleClickNode = function(params) {
|
|
120
|
+
var clickeNodeId;
|
|
121
|
+
if (params.nodes.length > 0) {
|
|
122
|
+
clickeNodeId = params.nodes[0];
|
|
123
|
+
for(var i = 0; i < newNodes.length; i++) {
|
|
124
|
+
if (newNodes[i].id === clickeNodeId) {
|
|
125
|
+
for(var j = 0; j < COMPONENTS.length; j++) {
|
|
126
|
+
if (COMPONENTS[j].name === newNodes[i].name) {
|
|
127
|
+
document.location.href = currentLocation.origin + currentLocation.pathname.replace(ACTUAL_COMPONENT.name, newNodes[i].name);
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
},
|
|
134
|
+
|
|
135
|
+
loadTree = function () {
|
|
136
|
+
setTimeout(function() {
|
|
137
|
+
container.style.height = document.getElementsByClassName('content')[0].offsetHeight - 140 + 'px';
|
|
138
|
+
var network = new vis.Network(container, data, options);
|
|
139
|
+
network.on('click', handleClickNode);
|
|
140
|
+
}, 200); // Fade is 0.150
|
|
141
|
+
};
|
|
142
|
+
|
|
143
|
+
loadTree();
|
|
144
|
+
treeTab.addEventListener('click', function() {
|
|
145
|
+
loadTree();
|
|
146
|
+
});
|
|
147
|
+
});
|