react-range-slider
Advanced tools
Comparing version 0.0.9 to 0.0.10
20
index.js
@@ -218,3 +218,2 @@ var React = require('react/addons'); | ||
getInitialState: function () { | ||
this.componentWillReceiveProps(this.props) | ||
return { | ||
@@ -236,2 +235,3 @@ index: -1, // TODO: find better solution | ||
componentWillMount: function () { | ||
this.componentWillReceiveProps(this.props) | ||
this.addEvent(window, 'resize', this.handleResize); | ||
@@ -385,9 +385,19 @@ }, | ||
zIndex = 0; | ||
child = child || React.createElement('span', null, this.state.min); | ||
child = child || React.createElement('span', null, | ||
React.createElement('span', | ||
null, | ||
this.state.min) | ||
); | ||
} else if (i === l + 1) { | ||
ref = 'tailer'; | ||
zIndex = 0; | ||
child = child || React.createElement('span', null, this.state.max); | ||
child = child || React.createElement('span', null, | ||
React.createElement('span', null, | ||
this.state.max) | ||
); | ||
} else { | ||
child = child || React.createElement('span', null, this.state.value[i - 1] ? this.state.value[i - 1].value : null); | ||
child = child || React.createElement('span', null, | ||
React.createElement('span', null, | ||
this.state.value[i - 1] ? this.state.value[i - 1].value : null) | ||
); | ||
} | ||
@@ -426,3 +436,3 @@ return Cursor({ | ||
calcOffset: function (v) { | ||
if(typeof v === 'undefined') return; | ||
if (typeof v === 'undefined') return; | ||
v = typeof v === 'number' ? v : v.value; | ||
@@ -429,0 +439,0 @@ var ratio = (v - this.props.min) / (this.props.max - this.props.min); |
{ | ||
"name": "react-range-slider", | ||
"version": "0.0.9", | ||
"version": "0.0.10", | ||
"description": "A flexible slider for reactjs.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
23125
634