summaryrefslogtreecommitdiffstats
path: root/src/navtree.js
diff options
context:
space:
mode:
authorDimitri van Heesch <dimitri@stack.nl>2011-11-17 21:22:48 (GMT)
committerDimitri van Heesch <dimitri@stack.nl>2011-11-17 21:22:48 (GMT)
commit720d85edd0316e1cedec3402e204ce418174305d (patch)
tree0c7c3ab3d6f38e212b2cd4a4628e3c9d32d49db3 /src/navtree.js
parent8491e9fbd06ef8a8f1cc542a524c673d7781d4b6 (diff)
downloadDoxygen-720d85edd0316e1cedec3402e204ce418174305d.zip
Doxygen-720d85edd0316e1cedec3402e204ce418174305d.tar.gz
Doxygen-720d85edd0316e1cedec3402e204ce418174305d.tar.bz2
Release-1.7.5.1-20111117
Diffstat (limited to 'src/navtree.js')
-rw-r--r--src/navtree.js36
1 files changed, 32 insertions, 4 deletions
diff --git a/src/navtree.js b/src/navtree.js
index ed37aa7..f3c0380 100644
--- a/src/navtree.js
+++ b/src/navtree.js
@@ -149,14 +149,12 @@ function newNode(o, po, text, link, childrenData, lastNode)
$(a).parent().parent().addClass('selected');
$(a).parent().parent().attr('id','selected');
var anchor = $(aname);
- var targetDiv = anchor.next();
- $(targetDiv).children('.memproto,.memdoc').effect("highlight",{},3000);
$("#doc-content").animate({
scrollTop: anchor.position().top +
$('#doc-content').scrollTop() -
$('#doc-content').offset().top
},500,function(){
- $(location).attr('href',aname);
+ window.location.replace(aname);
});
};
}
@@ -308,7 +306,7 @@ function showNode(o, node, index)
var anchor = $($(location).attr('hash'));
var targetDiv = anchor.next();
$(targetDiv).children('.memproto,.memdoc').
- effect("highlight", {}, 3000);
+ effect("highlight", {}, 1500);
}
else
{
@@ -363,6 +361,36 @@ function initNavTree(toroot,relpath)
}
},true);
+ $(window).bind('hashchange', function(){
+ if (window.location.hash && window.location.hash.length>1){
+ var anchor = $(window.location.hash);
+ var targetDiv = anchor.next();
+ $(targetDiv).children('.memproto,.memdoc').effect("highlight",{},1500);
+ var docContent = $('#doc-content');
+ if (docContent && anchor && anchor[0] && anchor[0].ownerDocument){
+ docContent.scrollTop(anchor.position().top+docContent.scrollTop()-docContent.offset().top);
+ }
+ var a;
+ if ($(location).attr('hash')){
+ var link=stripPath($(location).attr('pathname'))+':'+
+ $(location).attr('hash').substring(1);
+ a=$('.item a[class*=\""'+link+'"\"]');
+ }
+ if (a && a.length){
+ $('.item').removeClass('selected');
+ $('.item').removeAttr('id');
+ a.parent().parent().addClass('selected');
+ a.parent().parent().attr('id','selected');
+ var anchor = $($(location).attr('hash'));
+ var targetDiv = anchor.next();
+ showRoot();
+ }
+ } else {
+ var docContent = $('#doc-content');
+ if (docContent){ docContent.scrollTop(0); }
+ }
+ })
+
$(window).load(showRoot);
}