171 lines
4.8 KiB
JavaScript
171 lines
4.8 KiB
JavaScript
// Metro module 5326 (f5327).
|
|
import _classCallCheck from "./_classCallCheck";
|
|
import _createClass from "./_createClass";
|
|
import _possibleConstructorReturn from "./_possibleConstructorReturn";
|
|
import _getPrototypeOf from "./_getPrototypeOf";
|
|
import _get from "./_get";
|
|
import _inherits from "./_inherits";
|
|
import { ContinousBaseGesture } from "./Gesture";
|
|
let changeEventCalculator;
|
|
let PanGesture;
|
|
let env3225 = {};
|
|
env3225[4] = function _isNativeReflectConstruct() {
|
|
let c14800_0;
|
|
try {
|
|
c14800_0 = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
|
|
} catch ($e) {}
|
|
const _isNativeReflectConstruct2 = function _isNativeReflectConstruct() {
|
|
return !!c14800_0;
|
|
};
|
|
env3225[4] = _isNativeReflectConstruct2;
|
|
return _isNativeReflectConstruct2();
|
|
};
|
|
const changeEventCalculator2 = function changeEventCalculator(a0, a1) {
|
|
return {
|
|
...a0,
|
|
...a1 === void 0 ? {
|
|
changeX: a0.translationX,
|
|
changeY: a0.translationY
|
|
} : {
|
|
changeX: a0.translationX - a1.translationX,
|
|
changeY: a0.translationY - a1.translationY
|
|
}
|
|
};
|
|
};
|
|
changeEventCalculator2.__closure = {};
|
|
changeEventCalculator2.__workletHash = 1947784830943;
|
|
changeEventCalculator2.__initData = {
|
|
code: "function changeEventCalculator_Pnpm_panGestureTs1(current,previous){let changePayload;if(previous===undefined){changePayload={changeX:current.translationX,changeY:current.translationY};}else{changePayload={changeX:current.translationX-previous.translationX,changeY:current.translationY-previous.translationY};}return{...current,...changePayload};}"
|
|
};
|
|
changeEventCalculator = changeEventCalculator2;
|
|
PanGesture = function PanGesture() {
|
|
_classCallCheck(this, PanGesture);
|
|
const r8 = _getPrototypeOf(PanGesture);
|
|
const r20 = _possibleConstructorReturn(this, (0, env3225[4])() ? Reflect.construct(r8, [], _getPrototypeOf(this).constructor) : r8.apply(this, void 0));
|
|
r20.config = {};
|
|
r20.handlerName = "PanGestureHandler";
|
|
return r20;
|
|
};
|
|
_inherits(PanGesture, ContinousBaseGesture);
|
|
exports.PanGesture = _createClass(PanGesture, [{
|
|
key: "activeOffsetY",
|
|
value: function activeOffsetY(a0) {
|
|
if (Array.isArray(a0)) {
|
|
this.config.activeOffsetYStart = a0[0];
|
|
this.config.activeOffsetYEnd = a0[1];
|
|
} else if (a0 < 0) {
|
|
this.config.activeOffsetYStart = a0;
|
|
} else {
|
|
this.config.activeOffsetYEnd = a0;
|
|
}
|
|
return this;
|
|
}
|
|
}, {
|
|
key: "activeOffsetX",
|
|
value: function activeOffsetX(a0) {
|
|
if (Array.isArray(a0)) {
|
|
this.config.activeOffsetXStart = a0[0];
|
|
this.config.activeOffsetXEnd = a0[1];
|
|
} else if (a0 < 0) {
|
|
this.config.activeOffsetXStart = a0;
|
|
} else {
|
|
this.config.activeOffsetXEnd = a0;
|
|
}
|
|
return this;
|
|
}
|
|
}, {
|
|
key: "failOffsetY",
|
|
value: function failOffsetY(a0) {
|
|
if (Array.isArray(a0)) {
|
|
this.config.failOffsetYStart = a0[0];
|
|
this.config.failOffsetYEnd = a0[1];
|
|
} else if (a0 < 0) {
|
|
this.config.failOffsetYStart = a0;
|
|
} else {
|
|
this.config.failOffsetYEnd = a0;
|
|
}
|
|
return this;
|
|
}
|
|
}, {
|
|
key: "failOffsetX",
|
|
value: function failOffsetX(a0) {
|
|
if (Array.isArray(a0)) {
|
|
this.config.failOffsetXStart = a0[0];
|
|
this.config.failOffsetXEnd = a0[1];
|
|
} else if (a0 < 0) {
|
|
this.config.failOffsetXStart = a0;
|
|
} else {
|
|
this.config.failOffsetXEnd = a0;
|
|
}
|
|
return this;
|
|
}
|
|
}, {
|
|
key: "minPointers",
|
|
value: function minPointers(a0) {
|
|
this.config.minPointers = a0;
|
|
return this;
|
|
}
|
|
}, {
|
|
key: "maxPointers",
|
|
value: function maxPointers(a0) {
|
|
this.config.maxPointers = a0;
|
|
return this;
|
|
}
|
|
}, {
|
|
key: "minDistance",
|
|
value: function minDistance(a0) {
|
|
this.config.minDist = a0;
|
|
return this;
|
|
}
|
|
}, {
|
|
key: "minVelocity",
|
|
value: function minVelocity(a0) {
|
|
this.config.minVelocity = a0;
|
|
return this;
|
|
}
|
|
}, {
|
|
key: "minVelocityX",
|
|
value: function minVelocityX(a0) {
|
|
this.config.minVelocityX = a0;
|
|
return this;
|
|
}
|
|
}, {
|
|
key: "minVelocityY",
|
|
value: function minVelocityY(a0) {
|
|
this.config.minVelocityY = a0;
|
|
return this;
|
|
}
|
|
}, {
|
|
key: "averageTouches",
|
|
value: function averageTouches(a0) {
|
|
this.config.avgTouches = a0;
|
|
return this;
|
|
}
|
|
}, {
|
|
key: "enableTrackpadTwoFingerGesture",
|
|
value: function enableTrackpadTwoFingerGesture(a0) {
|
|
this.config.enableTrackpadTwoFingerGesture = a0;
|
|
return this;
|
|
}
|
|
}, {
|
|
key: "activateAfterLongPress",
|
|
value: function activateAfterLongPress(a0) {
|
|
this.config.activateAfterLongPress = a0;
|
|
return this;
|
|
}
|
|
}, {
|
|
key: "onChange",
|
|
value: function onChange(a0) {
|
|
this.handlers.changeEventCalculator = changeEventCalculator;
|
|
const _this = this;
|
|
let r13 = _get(_getPrototypeOf(PanGesture.prototype), "onChange", this);
|
|
let c25422_1 = r13;
|
|
if (typeof r13 === "function") {
|
|
r13 = function(a0) {
|
|
return c25422_1.apply(_this, a0);
|
|
};
|
|
}
|
|
return r13([a0]);
|
|
}
|
|
}]);
|