MCPcopy Create free account
hub / github.com/ARM-software/AVH / initNavTree

Function initNavTree

DoxyGen/Doxygen_Templates/navtree.js:489–550  ·  view source on GitHub ↗
(toroot,relpath)

Source from the content-addressed store, hash-verified

487});
488
489function initNavTree(toroot,relpath)
490{
491 var o = new Object();
492 o.toroot = toroot;
493 o.node = new Object();
494 o.node.li = document.getElementById("nav-tree-contents");
495 o.node.childrenData = NAVTREE;
496 o.node.children = new Array();
497 o.node.childrenUL = document.createElement("ul");
498 o.node.getChildrenUL = function() { return o.node.childrenUL; };
499 o.node.li.appendChild(o.node.childrenUL);
500 o.node.depth = 0;
501 o.node.relpath = relpath;
502 o.node.expanded = false;
503 o.node.isLast = true;
504 o.node.plus_img = document.createElement("span");
505 o.node.plus_img.className = 'arrow';
506 o.node.plus_img.innerHTML = arrowRight;
507
508 if (localStorageSupported()) {
509 var navSync = $('#nav-sync');
510 if (cachedLink()) {
511 showSyncOff(navSync,relpath);
512 navSync.removeClass('sync');
513 } else {
514 showSyncOn(navSync,relpath);
515 }
516 navSync.click(function(){ toggleSyncButton(relpath); });
517 }
518
519 if (loadTriggered) { // load before ready
520 navTo(o,toroot,hashUrl(),relpath);
521 showRoot();
522 } else { // ready before load
523 loadObject = o;
524 loadToRoot = toroot;
525 loadUrl = hashUrl();
526 loadRelPath = relpath;
527 readyTriggered=true;
528 }
529
530 $(window).bind('hashchange', function(){
531 if (window.location.hash && window.location.hash.length>1){
532 var a;
533 if ($(location).attr('hash')){
534 var clslink=stripPath(pathName())+':'+hashValue();
535 a=$('.item a[class$="'+clslink.replace(/</g,'\\3c ')+'"]');
536 }
537 if (a==null || !$(a).parent().parent().hasClass('selected')){
538 $('.item').removeClass('selected');
539 $('.item').removeAttr('id');
540 }
541 var link=stripPath2(pathName());
542 navTo(o,link,hashUrl(),relpath);
543 } else if (!animationInProgress) {
544 $('#doc-content').scrollTop(0);
545 $('.item').removeClass('selected');
546 $('.item').removeAttr('id');

Callers

nothing calls this directly

Calls 12

localStorageSupportedFunction · 0.85
cachedLinkFunction · 0.85
showSyncOffFunction · 0.85
showSyncOnFunction · 0.85
toggleSyncButtonFunction · 0.85
navToFunction · 0.85
hashUrlFunction · 0.85
showRootFunction · 0.85
stripPathFunction · 0.85
pathNameFunction · 0.85
hashValueFunction · 0.85
stripPath2Function · 0.85

Tested by

no test coverage detected