mirror of
https://github.com/wassname/slider.git
synced 2026-09-10 12:38:09 +08:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
19f1183634 | ||
|
|
200d0810ce | ||
|
|
e7007fbe8e | ||
|
|
8f490c80be |
@@ -36,3 +36,8 @@ env:
|
||||
global:
|
||||
- secure: S1VwbaPzLnSH/IUT/wlJulxAX5VHRIDmSt53h/ycHcZsszUpWcLCJRQAe0fTVB2dAx5MdBbSZ+o+tr3tRwVB5TRAYm0oTCsYAkOZaWOB28RuUQtdGt3wf9xxTG1UiPiaLLUW3waX9zAaf3yqKBcJGf1op0RD8dksxbCFw/7xVbU=
|
||||
- secure: EBEDg8k///IlEsnx0AE8X3mbFl0QE5+xGKbG4AxXlGZda12uTIPUSMKJzdZQ2hVbZXduTzf1cQl9rcu9nGoSnkL/DWnIax9cvHi+1orx5+YPlxPHNWAwWByTnHosBn2MJhfy1s5paJfHC9cUzmmEL6x4fYthWxjsPUo+irEZH6E=
|
||||
|
||||
|
||||
matrix:
|
||||
allow_failures:
|
||||
- env: "TEST_TYPE=saucelabs"
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "rc-slider",
|
||||
"version": "1.4.4",
|
||||
"version": "1.4.5",
|
||||
"description": "slider ui component for react",
|
||||
"keywords": [
|
||||
"react",
|
||||
|
||||
+4
-4
@@ -164,7 +164,7 @@ const Slider = React.createClass({
|
||||
const position = this._getTouchPosition(e);
|
||||
const value = this._calValueByPos(position);
|
||||
this._triggerEvents('onChange', value);
|
||||
this._start(position);
|
||||
this._start(position, value);
|
||||
this._addDocumentEvents('touch');
|
||||
pauseEvent(e);
|
||||
},
|
||||
@@ -173,7 +173,7 @@ const Slider = React.createClass({
|
||||
const position = e.pageX || (e.clientX + document.documentElement.scrollLeft); // to compat ie8
|
||||
const value = this._calValueByPos(position);
|
||||
this._triggerEvents('onChange', value);
|
||||
this._start(position);
|
||||
this._start(position, value);
|
||||
this._addDocumentEvents('mouse');
|
||||
pauseEvent(e);
|
||||
},
|
||||
@@ -468,9 +468,9 @@ const Slider = React.createClass({
|
||||
}
|
||||
},
|
||||
|
||||
_start(position) {
|
||||
_start(position, value) {
|
||||
this._triggerEvents('onBeforeChange');
|
||||
this.startValue = this.state.value;
|
||||
this.startValue = value;
|
||||
this.startPosition = position;
|
||||
this.setState({
|
||||
dragging: true,
|
||||
|
||||
Reference in New Issue
Block a user