UNPKG

create-expo-cljs-app

Version:

Create a react native application with Expo and Shadow-CLJS!

26 lines (20 loc) 527 B
import Hammer from '@egjs/hammerjs'; import { HammerInputExt } from './GestureHandler'; import IndiscreteGestureHandler from './IndiscreteGestureHandler'; class PinchGestureHandler extends IndiscreteGestureHandler { get name() { return 'pinch'; } get NativeGestureClass() { return Hammer.Pinch; } transformNativeEvent({ scale, velocity, center }: HammerInputExt) { return { focalX: center.x, focalY: center.y, velocity, scale, }; } } export default PinchGestureHandler;