@adoratorio/hades
Advanced tools
Comparing version 1.0.6 to 1.0.7
@@ -17,2 +17,3 @@ import Aion from '@adoratorio/aion'; | ||
invert: boolean; | ||
precision: number; | ||
} | ||
@@ -19,0 +20,0 @@ export interface Vec2 { |
@@ -52,2 +52,3 @@ "use strict"; | ||
invert: false, | ||
precision: 4, | ||
}; | ||
@@ -117,4 +118,4 @@ this.options = __assign(__assign({}, defaults), options); | ||
// Use 4 digits precision for velocity and absolutize | ||
this.velocity.x = parseFloat(this.velocity.x.toFixed(4)); | ||
this.velocity.y = parseFloat(this.velocity.y.toFixed(4)); | ||
this.velocity.x = parseFloat(this.velocity.x.toFixed(this.options.precision)); | ||
this.velocity.y = parseFloat(this.velocity.y.toFixed(this.options.precision)); | ||
// Check the scroll direction and reset the timeline if it's not automated by scrollTo | ||
@@ -121,0 +122,0 @@ var currentXDirection = this.velocity.x === 0 ? (Hades.DIRECTION.INITIAL) : (this.velocity.x > 0 ? Hades.DIRECTION.DOWN : Hades.DIRECTION.UP); |
{ | ||
"name": "@adoratorio/hades", | ||
"version": "1.0.6", | ||
"version": "1.0.7", | ||
"description": "A smooth scrollbar based on Hermes, scroll down 'till hell", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
59876
1250