mirror of
https://github.com/wassname/slider.git
synced 2026-09-12 12:50:45 +08:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
19f1183634 | ||
|
|
200d0810ce | ||
|
|
e7007fbe8e | ||
|
|
8f490c80be |
@@ -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
@@ -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
@@ -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,
|
||||||
|
|||||||
Reference in New Issue
Block a user