Skip to content

Commit

Permalink
fix(demo): fix add-nav scroll to selected sections (valor-software#3593)
Browse files Browse the repository at this point in the history
  • Loading branch information
EvilAlexei authored and valorkin committed Mar 1, 2018
1 parent 50defdd commit 8182d92
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions demo/src/app/common/add-nav/add-nav.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ export class AddNavComponent {
const anchor: string = item.dataset.anchor;
const target: HTMLElement = this.document.getElementById(anchor);
const header: HTMLElement = this.document.getElementById('header');
const headerIndent: number = header.offsetHeight + 6;
this.document.body.scrollTop = target.offsetTop - headerIndent;
const targetPosY: number = target.offsetTop - header.offsetHeight - 6;
window.scrollTo(0, targetPosY);
}
}
}

0 comments on commit 8182d92

Please sign in to comment.