File tree Expand file tree Collapse file tree 2 files changed +5
-8
lines changed Expand file tree Collapse file tree 2 files changed +5
-8
lines changed Original file line number Diff line number Diff line change @@ -12,8 +12,7 @@ export default AnchorComponent.extend({
12
12
let elem = $ ( `[data-${ qp } ="${ qpVal } "]` ) ;
13
13
let offset = ( elem && elem . offset && elem . offset ( ) ) ? elem . offset ( ) . top : null ;
14
14
if ( offset ) {
15
- const navMenuHeight = $ ( 'header' ) . outerHeight ( ) ;
16
- $ ( config . APP . scrollContainerSelector ) . scrollTop ( offset - navMenuHeight - 10 ) ;
15
+ $ ( config . APP . scrollContainerSelector ) . scrollTop ( offset - 10 ) ;
17
16
}
18
17
}
19
18
} ) ;
Original file line number Diff line number Diff line change @@ -14,17 +14,15 @@ export default Mixin.create({
14
14
15
15
didTransition ( ) {
16
16
this . _super ( ) ;
17
- let isAnchorEmpty = window && window . location && window . location . search === '?anchor='
18
- if ( ( typeof FastBoot === 'undefined' ) && isAnchorEmpty ) {
17
+ if ( ( typeof FastBoot === 'undefined' ) && window . location . search === '?anchor=' ) {
19
18
let elem = $ ( '#methods' ) ;
20
19
let offset = ( elem && elem . offset && elem . offset ( ) ) ? elem . offset ( ) . top : null ;
21
20
if ( offset ) {
22
- const navMenuHeight = $ ( 'header' ) . outerHeight ( ) ;
23
- $ ( config . APP . scrollContainerSelector ) . scrollTop ( offset - navMenuHeight - 10 ) ;
21
+ $ ( config . APP . scrollContainerSelector ) . scrollTop ( offset - 10 ) ;
22
+ return ;
24
23
}
25
- } else {
26
- this . get ( 'scrollPositionReset' ) . doReset ( ) ;
27
24
}
25
+ this . get ( 'scrollPositionReset' ) . doReset ( ) ;
28
26
}
29
27
}
30
28
} ) ;
You can’t perform that action at this time.
0 commit comments