42 lines
1.7 KiB
JavaScript
42 lines
1.7 KiB
JavaScript
// Module ID: 5558
|
|
// Function ID: 5559
|
|
// Name: transformRotationProps
|
|
// Dependencies: [5535, 5550, 5526]
|
|
|
|
// Module 5558 (transformRotationProps)
|
|
const require = arg1;
|
|
const dependencyMap = arg6;
|
|
function transformRotationProps(arg0) {
|
|
arg0.changeEventCalculator = require(5535) /* isGestureEnabled */.getChangeEventCalculator(diffCalculator);
|
|
arg0.fillInDefaultValues = fillInDefaultValues;
|
|
return arg0;
|
|
}
|
|
function diffCalculator(rotation, rotation2) {
|
|
rotation = rotation.rotation;
|
|
if (rotation2) {
|
|
let rotationChange = rotation - rotation2.rotation;
|
|
} else {
|
|
rotationChange = rotation;
|
|
}
|
|
return { rotationChange };
|
|
}
|
|
diffCalculator.__closure = {};
|
|
diffCalculator.__workletHash = 14071129947311;
|
|
diffCalculator.__initData = { code: "function diffCalculator_Pnpm_useRotationGestureTs1(current,previous){return{rotationChange:previous?current.rotation-previous.rotation:current.rotation};}" };
|
|
function fillInDefaultValues(arg0) {
|
|
arg0.rotationChange = 0;
|
|
}
|
|
fillInDefaultValues.__closure = {};
|
|
fillInDefaultValues.__workletHash = 2470118803733;
|
|
fillInDefaultValues.__initData = { code: "function fillInDefaultValues_Pnpm_useRotationGestureTs2(event){event.rotationChange=0;}" };
|
|
const map = new Map();
|
|
let closure_6 = {};
|
|
arg5.useRotationGesture = function useRotationGesture(gestureHandlerProps) {
|
|
let tmp = gestureHandlerProps;
|
|
if (gestureHandlerProps === undefined) {
|
|
tmp = closure_6;
|
|
}
|
|
const clonedAndRemappedConfig = require(5535) /* isGestureEnabled */.useClonedAndRemappedConfig(tmp, map, transformRotationProps);
|
|
const obj = require(5535) /* isGestureEnabled */;
|
|
return require(5550) /* useGesture */.useGesture(require(5526) /* ComposedGestureName */.SingleGestureName.Rotation, clonedAndRemappedConfig);
|
|
};
|