mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-18 02:21:20 -08:00
11 lines
385 B
TypeScript
11 lines
385 B
TypeScript
import type { MoveHost, PointerRegistry } from '../input/pointer-types'
|
|
import { isClosing } from '../lifecycle/instance'
|
|
|
|
export default function moveInit(art: MoveHost, events: Pick<PointerRegistry, 'proxy'>): void {
|
|
const { $player } = art.template
|
|
events.proxy($player, 'mousemove', (event) => {
|
|
if (!isClosing(art))
|
|
art.emit('mousemove', event as MouseEvent)
|
|
})
|
|
}
|