Skip to content
This repository has been archived by the owner on Mar 13, 2024. It is now read-only.

Commit

Permalink
fix: change type in centerElement from _HTMLElement_ to _Element_
Browse files Browse the repository at this point in the history
  • Loading branch information
davidpa9708 committed Nov 14, 2018
1 parent e301195 commit 72280ce
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/scroll.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ class Scroll {
this.animationManager.stopAllAnimations()
}
public centerElement(
element: HTMLElement,
element: Element,
value: number,
options: Partial<IOptions> = {},
): Animation {
Expand Down Expand Up @@ -131,7 +131,7 @@ class Scroll {
return value
}
}
private getDistToElement(element: HTMLElement, value: number, horizontal: boolean): number {
private getDistToElement(element: Element, value: number, horizontal: boolean): number {
const ratio = value / 100
const direction = toDirection(horizontal)
const elementWrapper = new ScrollElement(element)
Expand Down

0 comments on commit 72280ce

Please sign in to comment.