MCPcopy Create free account
hub / github.com/Barrior/JParticles / handleMove

Method handleMove

src/particle.ts:391–403  ·  view source on GitHub ↗
(e: MouseEvent)

Source from the content-addressed store, hash-verified

389 }
390
391 const handleMove = (e: MouseEvent) => {
392 if (this.isPaused) return
393
394 let left = e.pageX
395 let top = e.pageY
396
397 const offset = this.getEventElemOffset()
398 if (offset) {
399 left -= offset.left
400 top -= offset.top
401 }
402 move(left, top)
403 }
404
405 eventElem!.addEventListener('mousemove', handleMove as EventListener)
406

Callers

nothing calls this directly

Calls 1

getEventElemOffsetMethod · 0.95

Tested by

no test coverage detected