GT2/Ejectable/node_modules/react-native-gesture-handler/lib/module/web/PinchGestureHandler.js

29 lines
520 B
JavaScript
Raw Normal View History

2021-08-16 00:14:59 +00:00
import Hammer from '@egjs/hammerjs';
import IndiscreteGestureHandler from './IndiscreteGestureHandler';
class PinchGestureHandler extends IndiscreteGestureHandler {
get name() {
return 'pinch';
}
get NativeGestureClass() {
return Hammer.Pinch;
}
transformNativeEvent({
scale,
velocity,
center
}) {
return {
focalX: center.x,
focalY: center.y,
velocity,
scale
};
}
}
export default PinchGestureHandler;
//# sourceMappingURL=PinchGestureHandler.js.map