react-slider
Advanced tools
Comparing version 0.11.1 to 0.11.2
{ | ||
"name": "react-slider", | ||
"version": "0.11.1", | ||
"version": "0.11.2", | ||
"description": "Slider component for React", | ||
@@ -5,0 +5,0 @@ "main": "react-slider.js", |
@@ -281,16 +281,16 @@ (function (root, factory) { | ||
var slider = this.slider; | ||
var handle = this.handle0; | ||
var rect = slider.getBoundingClientRect(); | ||
var handle = this.handle0; | ||
var rect = slider.getBoundingClientRect(); | ||
var size = this._sizeKey(); | ||
var size = this._sizeKey(); | ||
var sliderMax = rect[this._posMaxKey()]; | ||
var sliderMin = rect[this._posMinKey()]; | ||
var sliderMax = rect[this._posMaxKey()]; | ||
var sliderMin = rect[this._posMinKey()]; | ||
this.setState({ | ||
upperBound: slider[size] - handle[size], | ||
sliderLength: Math.abs(sliderMax - sliderMin), | ||
handleSize: handle[size], | ||
sliderStart: this.props.invert ? sliderMax : sliderMin | ||
}); | ||
this.setState({ | ||
upperBound: slider[size] - handle[size], | ||
sliderLength: Math.abs(sliderMax - sliderMin), | ||
handleSize: handle[size], | ||
sliderStart: this.props.invert ? sliderMax : sliderMin | ||
}); | ||
}, | ||
@@ -741,2 +741,3 @@ | ||
_renderHandle: function (style, child, i) { | ||
var self = this; | ||
var className = this.props.handleClassName + ' ' + | ||
@@ -748,3 +749,5 @@ (this.props.handleClassName + '-' + i) + ' ' + | ||
React.createElement('div', { | ||
ref: r => (this['handle' + i] = r), | ||
ref: function (r) { | ||
self['handle' + i] = r; | ||
}, | ||
key: 'handle' + i, | ||
@@ -792,6 +795,9 @@ className: className, | ||
_renderBar: function (i, offsetFrom, offsetTo) { | ||
var self = this; | ||
return ( | ||
React.createElement('div', { | ||
key: 'bar' + i, | ||
ref: r => (this['bar' + i] = r), | ||
ref: function (r) { | ||
self['bar' + i] = r; | ||
}, | ||
className: this.props.barClassName + ' ' + this.props.barClassName + '-' + i, | ||
@@ -850,2 +856,3 @@ style: this._buildBarStyle(offsetFrom, this.state.upperBound - offsetTo) | ||
render: function () { | ||
var self = this; | ||
var state = this.state; | ||
@@ -866,3 +873,5 @@ var props = this.props; | ||
React.createElement('div', { | ||
ref: r => (this.slider = r), | ||
ref: function (r) { | ||
self.slider = r; | ||
}, | ||
style: {position: 'relative'}, | ||
@@ -869,0 +878,0 @@ className: props.className + (props.disabled ? ' disabled' : ''), |
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
37673
741