Skip to content

Commit

Permalink
minor cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
Matt Colman committed Dec 22, 2016
1 parent 2710874 commit 44cecfa
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
12 changes: 8 additions & 4 deletions src/TappableMixin.js
Original file line number Diff line number Diff line change
Expand Up @@ -201,13 +201,17 @@ var Mixin = {
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 Down
5 changes: 5 additions & 0 deletions src/getComponent.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ module.exports = function (mixins) {
}, this.handlers());

delete newComponentProps.activeDelay;
delete newComponentProps.allowReactivation;
delete newComponentProps.classBase;
delete newComponentProps.classes;
delete newComponentProps.handlers;
Expand All @@ -58,7 +59,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

0 comments on commit 44cecfa

Please sign in to comment.