81 lines
2.7 KiB
JavaScript
81 lines
2.7 KiB
JavaScript
// Metro module 5331 (f5332).
|
|
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 ForceTouchGesture;
|
|
let env3235 = {};
|
|
env3235[4] = function _isNativeReflectConstruct() {
|
|
let c14805_0;
|
|
try {
|
|
c14805_0 = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
|
|
} catch ($e) {}
|
|
const _isNativeReflectConstruct2 = function _isNativeReflectConstruct() {
|
|
return !!c14805_0;
|
|
};
|
|
env3235[4] = _isNativeReflectConstruct2;
|
|
return _isNativeReflectConstruct2();
|
|
};
|
|
const changeEventCalculator2 = function changeEventCalculator(a0, a1) {
|
|
return {
|
|
...a0,
|
|
...a1 === void 0 ? {
|
|
forceChange: a0.force
|
|
} : {
|
|
forceChange: a0.force - a1.force
|
|
}
|
|
};
|
|
};
|
|
changeEventCalculator2.__closure = {};
|
|
changeEventCalculator2.__workletHash = 11365193947542;
|
|
changeEventCalculator2.__initData = {
|
|
code: "function changeEventCalculator_Pnpm_forceTouchGestureTs1(current,previous){let changePayload;if(previous===undefined){changePayload={forceChange:current.force};}else{changePayload={forceChange:current.force-previous.force};}return{...current,...changePayload};}"
|
|
};
|
|
changeEventCalculator = changeEventCalculator2;
|
|
ForceTouchGesture = function ForceTouchGesture() {
|
|
_classCallCheck(this, ForceTouchGesture);
|
|
const r8 = _getPrototypeOf(ForceTouchGesture);
|
|
const r20 = _possibleConstructorReturn(this, (0, env3235[4])() ? Reflect.construct(r8, [], _getPrototypeOf(this).constructor) : r8.apply(this, void 0));
|
|
r20.config = {};
|
|
r20.handlerName = "ForceTouchGestureHandler";
|
|
return r20;
|
|
};
|
|
_inherits(ForceTouchGesture, ContinousBaseGesture);
|
|
exports.ForceTouchGesture = _createClass(ForceTouchGesture, [{
|
|
key: "minForce",
|
|
value: function minForce(a0) {
|
|
this.config.minForce = a0;
|
|
return this;
|
|
}
|
|
}, {
|
|
key: "maxForce",
|
|
value: function maxForce(a0) {
|
|
this.config.maxForce = a0;
|
|
return this;
|
|
}
|
|
}, {
|
|
key: "feedbackOnActivation",
|
|
value: function feedbackOnActivation(a0) {
|
|
this.config.feedbackOnActivation = a0;
|
|
return this;
|
|
}
|
|
}, {
|
|
key: "onChange",
|
|
value: function onChange(a0) {
|
|
this.handlers.changeEventCalculator = changeEventCalculator;
|
|
const _this = this;
|
|
let r13 = _get(_getPrototypeOf(ForceTouchGesture.prototype), "onChange", this);
|
|
let c25425_1 = r13;
|
|
if (typeof r13 === "function") {
|
|
r13 = function(a0) {
|
|
return c25425_1.apply(_this, a0);
|
|
};
|
|
}
|
|
return r13([a0]);
|
|
}
|
|
}]);
|