Skip to content

Commit

Permalink
oops re-build
Browse files Browse the repository at this point in the history
  • Loading branch information
Matt Colman committed Dec 21, 2016
1 parent de14d19 commit a476d4b
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 31 deletions.
10 changes: 0 additions & 10 deletions dist/react-tappable.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,18 +97,14 @@ var Mixin = {
},

onTouchStart: function onTouchStart(event) {
console.log('1');
if (this.props.onTouchStart && this.props.onTouchStart(event) === false) return;
console.log('2');
this.processEvent(event);
window._blockMouseEvents = true;
if (event.touches.length === 1) {
console.log('3');
this._initialTouch = this._lastTouch = getTouchProps(event.touches[0]);
this.initScrollDetection();
this.initPressDetection(event, this.endTouch);
this.initTouchmoveDetection();
console.log('setTimeout', this.props.activeDelay);
if (this.props.activeDelay === 0) {
this.makeActive();
} else {
Expand All @@ -120,9 +116,7 @@ var Mixin = {
},

makeActive: function makeActive() {
console.log('makeActive');
if (!this.isMounted()) return;
console.log('really');
this.clearActiveTimeout();
this.setState({
isActive: true
Expand Down Expand Up @@ -219,19 +213,15 @@ var Mixin = {
if (movement.x > this.props.pressMoveThreshold || movement.y > this.props.pressMoveThreshold) {
this.cancelPressDetection();
}
console.log('moving', movement.y);
if (movement.x > (this.props.moveThresholdX || this.props.moveThreshold) || movement.y > (this.props.moveThresholdY || this.props.moveThreshold)) {
console.log('a', this.state.isActive);
if (this.state.isActive) {
console.log('d');
this.setState({
isActive: false
});
} else if (this._activeTimeout) {
this.clearActiveTimeout();
}
} else if (this.props.allowReactivation) {
console.log('b');
if (!this.state.isActive && !this._activeTimeout) {
this.setState({
isActive: true
Expand Down
Loading

0 comments on commit a476d4b

Please sign in to comment.