From 72280ce1fe7ea56999694d45ffcad95d9ed02365 Mon Sep 17 00:00:00 2001 From: David Perez Alvarez Date: Tue, 13 Nov 2018 21:31:42 -0500 Subject: [PATCH] fix: change type in `centerElement` from _HTMLElement_ to _Element_ --- src/scroll.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/scroll.ts b/src/scroll.ts index ff15b04..601fc58 100644 --- a/src/scroll.ts +++ b/src/scroll.ts @@ -63,7 +63,7 @@ class Scroll { this.animationManager.stopAllAnimations() } public centerElement( - element: HTMLElement, + element: Element, value: number, options: Partial = {}, ): Animation { @@ -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)