(target, defaultPayload)
| 285 | } |
| 286 | |
| 287 | export function pointermove(target, defaultPayload) { |
| 288 | const dispatch = arg => target.dispatchEvent(arg); |
| 289 | const pointerType = getPointerType(defaultPayload); |
| 290 | |
| 291 | const payload = { |
| 292 | pointerId: defaultPointerId, |
| 293 | pointerType, |
| 294 | ...defaultPayload, |
| 295 | }; |
| 296 | |
| 297 | if (hasPointerEvent()) { |
| 298 | dispatch( |
| 299 | domEvents.pointermove({ |
| 300 | pressure: pointerType === 'touch' ? 1 : 0.5, |
| 301 | ...payload, |
| 302 | }), |
| 303 | ); |
| 304 | } else { |
| 305 | if (pointerType === 'mouse') { |
| 306 | dispatch(domEvents.mousemove(payload)); |
| 307 | } else { |
| 308 | const touch = createTouch(target, payload); |
| 309 | touchStore.updateTouch(touch); |
| 310 | const touchEventPayload = createTouchEventPayload(target, touch, payload); |
| 311 | dispatch(domEvents.touchmove(touchEventPayload)); |
| 312 | } |
| 313 | } |
| 314 | } |
| 315 | |
| 316 | export function pointerup(target, defaultPayload) { |
| 317 | const dispatch = arg => target.dispatchEvent(arg); |
nothing calls this directly
no test coverage detected