Compare commits

..
4 Commits
Author SHA1 Message Date
simaQ 19f1183634 update version 2015-08-29 10:58:26 +08:00
simaQ 200d0810ce Merge pull request #21 from danioso/master
Sending new value to _start while dragging
2015-08-29 10:57:19 +08:00
Daniel Osorio e7007fbe8e Sending new value to _start while dragging 2015-08-27 19:23:57 -05:00
yiminghe 8f490c80be up 2015-08-25 21:45:26 +08:00
3 changed files with 10 additions and 5 deletions
+5
View File
@@ -36,3 +36,8 @@ env:
global: global:
- secure: S1VwbaPzLnSH/IUT/wlJulxAX5VHRIDmSt53h/ycHcZsszUpWcLCJRQAe0fTVB2dAx5MdBbSZ+o+tr3tRwVB5TRAYm0oTCsYAkOZaWOB28RuUQtdGt3wf9xxTG1UiPiaLLUW3waX9zAaf3yqKBcJGf1op0RD8dksxbCFw/7xVbU= - secure: S1VwbaPzLnSH/IUT/wlJulxAX5VHRIDmSt53h/ycHcZsszUpWcLCJRQAe0fTVB2dAx5MdBbSZ+o+tr3tRwVB5TRAYm0oTCsYAkOZaWOB28RuUQtdGt3wf9xxTG1UiPiaLLUW3waX9zAaf3yqKBcJGf1op0RD8dksxbCFw/7xVbU=
- secure: EBEDg8k///IlEsnx0AE8X3mbFl0QE5+xGKbG4AxXlGZda12uTIPUSMKJzdZQ2hVbZXduTzf1cQl9rcu9nGoSnkL/DWnIax9cvHi+1orx5+YPlxPHNWAwWByTnHosBn2MJhfy1s5paJfHC9cUzmmEL6x4fYthWxjsPUo+irEZH6E= - secure: EBEDg8k///IlEsnx0AE8X3mbFl0QE5+xGKbG4AxXlGZda12uTIPUSMKJzdZQ2hVbZXduTzf1cQl9rcu9nGoSnkL/DWnIax9cvHi+1orx5+YPlxPHNWAwWByTnHosBn2MJhfy1s5paJfHC9cUzmmEL6x4fYthWxjsPUo+irEZH6E=
matrix:
allow_failures:
- env: "TEST_TYPE=saucelabs"
+1 -1
View File
@@ -1,6 +1,6 @@
{ {
"name": "rc-slider", "name": "rc-slider",
"version": "1.4.4", "version": "1.4.5",
"description": "slider ui component for react", "description": "slider ui component for react",
"keywords": [ "keywords": [
"react", "react",
+4 -4
View File
@@ -164,7 +164,7 @@ const Slider = React.createClass({
const position = this._getTouchPosition(e); const position = this._getTouchPosition(e);
const value = this._calValueByPos(position); const value = this._calValueByPos(position);
this._triggerEvents('onChange', value); this._triggerEvents('onChange', value);
this._start(position); this._start(position, value);
this._addDocumentEvents('touch'); this._addDocumentEvents('touch');
pauseEvent(e); pauseEvent(e);
}, },
@@ -173,7 +173,7 @@ const Slider = React.createClass({
const position = e.pageX || (e.clientX + document.documentElement.scrollLeft); // to compat ie8 const position = e.pageX || (e.clientX + document.documentElement.scrollLeft); // to compat ie8
const value = this._calValueByPos(position); const value = this._calValueByPos(position);
this._triggerEvents('onChange', value); this._triggerEvents('onChange', value);
this._start(position); this._start(position, value);
this._addDocumentEvents('mouse'); this._addDocumentEvents('mouse');
pauseEvent(e); pauseEvent(e);
}, },
@@ -468,9 +468,9 @@ const Slider = React.createClass({
} }
}, },
_start(position) { _start(position, value) {
this._triggerEvents('onBeforeChange'); this._triggerEvents('onBeforeChange');
this.startValue = this.state.value; this.startValue = value;
this.startPosition = position; this.startPosition = position;
this.setState({ this.setState({
dragging: true, dragging: true,