@@ -114,7 +114,7 @@ function createIndent(o,domNode,node) {
114
114
115
115
let animationInProgress = false ;
116
116
117
- function gotoAnchor ( anchor , aname , updateLocation ) {
117
+ function gotoAnchor ( anchor , aname ) {
118
118
let pos , docContent = $ ( '#doc-content' ) ;
119
119
let ancParent = $ ( anchor . parent ( ) ) ;
120
120
if ( ancParent . hasClass ( 'memItemLeft' ) ||
@@ -135,7 +135,7 @@ function gotoAnchor(anchor,aname,updateLocation) {
135
135
docContent . animate ( {
136
136
scrollTop : pos + docContent . scrollTop ( ) - docContent . offset ( ) . top
137
137
} , Math . max ( 50 , Math . min ( 500 , dist ) ) , function ( ) {
138
- if ( updateLocation ) window . location . href = aname ;
138
+ window . location . href = aname ;
139
139
animationInProgress = false ;
140
140
} ) ;
141
141
}
@@ -191,7 +191,7 @@ function newNode(o, po, text, link, childrenData, lastNode) {
191
191
$ ( a ) . parent ( ) . parent ( ) . attr ( 'id' , 'selected' ) ;
192
192
}
193
193
const anchor = $ ( aname ) ;
194
- gotoAnchor ( anchor , aname , true ) ;
194
+ gotoAnchor ( anchor , aname ) ;
195
195
} ;
196
196
} else {
197
197
a . href = url ;
@@ -276,6 +276,7 @@ function highlightAnchor() {
276
276
} else {
277
277
glowEffect ( anchor . next ( ) , 1000 ) ; // normal member
278
278
}
279
+ gotoAnchor ( anchor , aname ) ;
279
280
}
280
281
281
282
function selectAndHighlight ( hash , n ) {
@@ -505,7 +506,7 @@ function initNavTree(toroot,relpath) {
505
506
$ ( "div.toc a[href]" ) . click ( function ( e ) {
506
507
e . preventDefault ( ) ;
507
508
const aname = $ ( this ) . attr ( "href" ) ;
508
- gotoAnchor ( $ ( aname ) , aname , true ) ;
509
+ gotoAnchor ( $ ( aname ) , aname ) ;
509
510
} )
510
511
}
511
512
/* @license -end */
0 commit comments