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

40 lines
831 B
JavaScript
Raw Normal View History

2021-08-16 00:14:59 +00:00
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _hammerjs = _interopRequireDefault(require("@egjs/hammerjs"));
var _IndiscreteGestureHandler = _interopRequireDefault(require("./IndiscreteGestureHandler"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
class PinchGestureHandler extends _IndiscreteGestureHandler.default {
get name() {
return 'pinch';
}
get NativeGestureClass() {
return _hammerjs.default.Pinch;
}
transformNativeEvent({
scale,
velocity,
center
}) {
return {
focalX: center.x,
focalY: center.y,
velocity,
scale
};
}
}
var _default = PinchGestureHandler;
exports.default = _default;
//# sourceMappingURL=PinchGestureHandler.js.map