rc-slider
Advanced tools
Comparing version 3.6.0 to 3.6.2
@@ -93,8 +93,3 @@ 'use strict'; | ||
if (props.range && upperBound === lowerBound) { | ||
if (lowerBound === max) { | ||
recent = 'lowerBound'; | ||
} | ||
if (upperBound === min) { | ||
recent = 'upperBound'; | ||
} | ||
recent = lowerBound === max ? 'lowerBound' : 'upperBound'; | ||
} else { | ||
@@ -303,5 +298,4 @@ recent = 'upperBound'; | ||
key: 'getPrecision', | ||
value: function getPrecision() { | ||
var props = this.props; | ||
var stepString = props.step.toString(); | ||
value: function getPrecision(step) { | ||
var stepString = step.toString(); | ||
var precision = 0; | ||
@@ -359,3 +353,3 @@ if (stepString.indexOf('.') >= 0) { | ||
return step !== null ? parseFloat(closestPoint.toFixed(this.getPrecision())) : closestPoint; | ||
return step !== null ? parseFloat(closestPoint.toFixed(this.getPrecision(step))) : closestPoint; | ||
} | ||
@@ -362,0 +356,0 @@ }, { |
@@ -19,3 +19,8 @@ 'use strict'; | ||
var _warning = require('warning'); | ||
var _warning2 = _interopRequireDefault(_warning); | ||
function calcPoints(vertical, marks, dots, step, min, max) { | ||
(0, _warning2['default'])(dots ? step > 0 : true, '`Slider[step]` should be a positive number in order to make Slider[dots] work.'); | ||
var points = Object.keys(marks).map(parseFloat); | ||
@@ -22,0 +27,0 @@ if (dots) { |
{ | ||
"name": "rc-slider", | ||
"version": "3.6.0", | ||
"version": "3.6.2", | ||
"description": "slider ui component for react", | ||
@@ -55,4 +55,5 @@ "keywords": [ | ||
"rc-tooltip": "3.x", | ||
"rc-util": "3.x" | ||
"rc-util": "3.x", | ||
"warning": "^2.1.0" | ||
} | ||
} |
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
44743
4
965
+ Addedwarning@^2.1.0
+ Addedwarning@2.1.0(transitive)