Skip to content

Commit

Permalink
build
Browse files Browse the repository at this point in the history
  • Loading branch information
Matt Colman committed Dec 22, 2016
1 parent 44cecfa commit 417806e
Show file tree
Hide file tree
Showing 5 changed files with 46 additions and 19 deletions.
21 changes: 15 additions & 6 deletions dist/react-tappable.js
Original file line number Diff line number Diff line change
Expand Up @@ -213,15 +213,19 @@ var Mixin = {
if (movement.x > this.props.pressMoveThreshold || movement.y > this.props.pressMoveThreshold) {
this.cancelPressDetection();
}
if (movement.x > (this.props.moveThresholdX || this.props.moveThreshold) || movement.y > (this.props.moveThresholdY || this.props.moveThreshold)) {
if (movement.x > (this.props.moveXThreshold || this.props.moveThreshold) || movement.y > (this.props.moveYThreshold || this.props.moveThreshold)) {
if (this.state.isActive) {
this.setState({
isActive: false
});
if (this.props.allowReactivation) {
this.setState({
isActive: false
});
} else {
return this.endTouch(event);
}
} else if (this._activeTimeout) {
this.clearActiveTimeout();
}
} else if (this.props.allowReactivation) {
} else {
if (!this.state.isActive && !this._activeTimeout) {
this.setState({
isActive: true
Expand All @@ -241,7 +245,7 @@ var Mixin = {
this.processEvent(event);
var afterEndTouch;
var movement = this.calculateMovement(this._lastTouch);
if (movement.x <= (this.props.moveThresholdX || this.props.moveThreshold) && movement.y <= (this.props.moveThresholdY || this.props.moveThreshold) && this.props.onTap) {
if (movement.x <= (this.props.moveXThreshold || this.props.moveThreshold) && movement.y <= (this.props.moveYThreshold || this.props.moveThreshold) && this.props.onTap) {
event.preventDefault();
afterEndTouch = function () {
var finalParentScrollPos = _this._scrollParents.map(function (node) {
Expand Down Expand Up @@ -437,6 +441,7 @@ module.exports = function (mixins) {
}, this.handlers());

delete newComponentProps.activeDelay;
delete newComponentProps.allowReactivation;
delete newComponentProps.classBase;
delete newComponentProps.classes;
delete newComponentProps.handlers;
Expand All @@ -445,7 +450,11 @@ module.exports = function (mixins) {
delete newComponentProps.onPinchStart;
delete newComponentProps.onPinchMove;
delete newComponentProps.onPinchEnd;
delete newComponentProps.onDeactivate;
delete newComponentProps.onReactivate;
delete newComponentProps.moveThreshold;
delete newComponentProps.moveXThreshold;
delete newComponentProps.moveYThreshold;
delete newComponentProps.pressDelay;
delete newComponentProps.pressMoveThreshold;
delete newComponentProps.preventDefault;
Expand Down
Loading

0 comments on commit 417806e

Please sign in to comment.