File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change 1
1
/* eslint-disable ember/classic-decorator-no-classic-methods */
2
- import { get } from '@ember/object' ;
3
2
import AnchorComponent from 'ember-anchor/components/ember-anchor' ;
4
3
import config from 'ember-api-docs/config/environment' ;
5
4
import getOffset from 'ember-api-docs/utils/get-offset' ;
6
5
7
6
export default class EmberAnchor extends AnchorComponent {
8
7
// This overrides Ember Anchor to support scrolling within a fixed position element
9
8
_scrollToElemPosition ( ) {
10
- let qp = this . anchorQueryParam ;
11
- let qpVal = this . get ( get ( this , 'attrs.a' ) ? 'a' : `controller. ${ qp } ` ) ;
12
- let elem = document . querySelector ( `[data- ${ qp } =" ${ qpVal } "]` ) ;
9
+ let elem = document . querySelector (
10
+ `[data- ${ this . anchorQueryParam } =" ${ this . a } "]`
11
+ ) ;
13
12
14
13
if ( elem && elem . offsetHeight ) {
15
14
const offsetToScroll = getOffset (
You can’t perform that action at this time.
0 commit comments