MCPcopy Create free account
hub / github.com/NativeScript/NativeScript / _getPinchData

Function _getPinchData

packages/core/ui/gestures/index.ios.ts:417–433  ·  view source on GitHub ↗
(args: GestureEventData)

Source from the content-addressed store, hash-verified

415}
416
417function _getPinchData(args: GestureEventData): PinchGestureEventData {
418 const recognizer = <UIPinchGestureRecognizer>args.ios;
419 const center = recognizer.locationInView(args.view.nativeViewProtected);
420
421 return <PinchGestureEventData>{
422 type: args.type,
423 view: args.view,
424 ios: args.ios,
425 android: undefined,
426 scale: recognizer.scale,
427 getFocusX: () => center.x,
428 getFocusY: () => center.y,
429 object: args.view,
430 eventName: toString(args.type),
431 state: getState(recognizer),
432 };
433}
434
435function _getSwipeData(args: GestureEventData): SwipeGestureEventData {
436 const recognizer = <UISwipeGestureRecognizer>args.ios;

Callers 1

_attachMethod · 0.85

Calls 3

toStringFunction · 0.90
getStateFunction · 0.85
locationInViewMethod · 0.65

Tested by

no test coverage detected