MCPcopy Index your code
hub / github.com/callstack/agent-device / pinchAndroid

Function pinchAndroid

src/platforms/android/multitouch-helper.ts:143–158  ·  view source on GitHub ↗
(
  device: DeviceInfo,
  options: AndroidPinchGestureOptions,
)

Source from the content-addressed store, hash-verified

141}
142
143export async function pinchAndroid(
144 device: DeviceInfo,
145 options: AndroidPinchGestureOptions,
146): Promise<Record<string, unknown>> {
147 if (!Number.isFinite(options.scale) || options.scale <= 0) {
148 throw new AppError('INVALID_ARGS', 'gesture pinch requires scale > 0');
149 }
150 const center = await resolveGestureCenter(device, options.x, options.y);
151 return await performAndroidTouchGesture(device, {
152 kind: 'pinch',
153 x: center.x,
154 y: center.y,
155 scale: options.scale,
156 durationMs: options.durationMs,
157 });
158}
159
160export async function rotateGestureAndroid(
161 device: DeviceInfo,

Callers 1

createAndroidInteractorFunction · 0.90

Calls 3

resolveGestureCenterFunction · 0.85
isFiniteMethod · 0.80

Tested by

no test coverage detected