react-scrubber
Advanced tools
Comparing version 0.2.3 to 0.2.4
@@ -0,0 +0,0 @@ import React, { Component } from 'react'; |
@@ -26,2 +26,3 @@ "use strict"; | ||
var clamp = function (min, max, val) { return Math.min(Math.max(min, val), max); }; | ||
var round = function (val, dp) { return parseFloat(val.toFixed(dp)); }; | ||
var Scrubber = /** @class */ (function (_super) { | ||
@@ -49,4 +50,4 @@ __extends(Scrubber, _super); | ||
var clampedX = clamp(left, left + width, cursorX); | ||
var decimal = ((clampedX - left) / width).toFixed(7); | ||
return (max - min) * parseFloat(decimal); | ||
var decimal = round((clampedX - left) / width, 7); | ||
return round((max - min) * decimal, 7); | ||
}; | ||
@@ -53,0 +54,0 @@ _this.handleMouseMove = function (e) { |
{ | ||
"name": "react-scrubber", | ||
"version": "0.2.3", | ||
"version": "0.2.4", | ||
"description": "React scrubber component with touch controls, styling, and lots event handlers", | ||
@@ -8,3 +8,3 @@ "main": "./lib/index.js", | ||
"build": "tsc", | ||
"postbuild": "find ./src -name '*.css' -type f -exec cp -P {} ./lib \\;", | ||
"postbuild": "node postbuild.js", | ||
"prepublish": "yarn build", | ||
@@ -11,0 +11,0 @@ "test": "echo \"Error: no test specified\" && exit 1" |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
22759
392