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

Function _getTapData

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

Source from the content-addressed store, hash-verified

398}
399
400function _getTapData(args: GestureEventData): TapGestureEventData {
401 const recognizer = <UITapGestureRecognizer>args.ios;
402 const center = recognizer.locationInView(args.view.nativeViewProtected);
403
404 return <TapGestureEventData>{
405 type: args.type,
406 view: args.view,
407 ios: args.ios,
408 android: undefined,
409 eventName: args.eventName,
410 object: args.object,
411 getPointerCount: () => recognizer.numberOfTouches,
412 getX: () => center.x,
413 getY: () => center.y,
414 };
415}
416
417function _getPinchData(args: GestureEventData): PinchGestureEventData {
418 const recognizer = <UIPinchGestureRecognizer>args.ios;

Callers 1

_attachMethod · 0.85

Calls 1

locationInViewMethod · 0.65

Tested by

no test coverage detected