(
event: PointerEvent,
{
pointerId,
width,
height,
pressure,
tangentialPressure,
tiltX,
tiltY,
twist,
pointerType,
isPrimary,
buttons,
}: PointerEventInit,
)
| 244 | } |
| 245 | |
| 246 | function initPointerEvent( |
| 247 | event: PointerEvent, |
| 248 | { |
| 249 | pointerId, |
| 250 | width, |
| 251 | height, |
| 252 | pressure, |
| 253 | tangentialPressure, |
| 254 | tiltX, |
| 255 | tiltY, |
| 256 | twist, |
| 257 | pointerType, |
| 258 | isPrimary, |
| 259 | buttons, |
| 260 | }: PointerEventInit, |
| 261 | ) { |
| 262 | assignProps(event, { |
| 263 | pointerId: sanitizeNumber(pointerId), |
| 264 | width: sanitizeNumber(width ?? 1), |
| 265 | height: sanitizeNumber(height ?? 1), |
| 266 | pressure: sanitizeNumber(pressure ?? (buttons ? 0.5 : 0)), |
| 267 | tangentialPressure: sanitizeNumber(tangentialPressure), |
| 268 | tiltX: sanitizeNumber(tiltX), |
| 269 | tiltY: sanitizeNumber(tiltY), |
| 270 | twist: sanitizeNumber(twist), |
| 271 | pointerType: String(pointerType ?? ''), |
| 272 | isPrimary: Boolean(isPrimary), |
| 273 | }) |
| 274 | } |
nothing calls this directly
no test coverage detected