From ff6ef1b63a3996906191142c98b1dd277d6ce24f Mon Sep 17 00:00:00 2001 From: Thomas Zilz Date: Tue, 6 Mar 2018 11:39:14 +0100 Subject: [PATCH] Initialise _wheelPartialScroll to 0 to prevent NaN --- src/Viewport.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Viewport.ts b/src/Viewport.ts index c64bfbb7..e276d113 100644 --- a/src/Viewport.ts +++ b/src/Viewport.ts @@ -24,7 +24,7 @@ export class Viewport implements IViewport { // Stores a partial line amount when scrolling, this is used to keep track of how much of a line // is scrolled so we can "scroll" over partial lines and feel natural on touchpads. This is a // quick fix and could have a more robust solution in place that reset the value when needed. - private _wheelPartialScroll: number; + private _wheelPartialScroll: number = 0; /** * Creates a new Viewport.