分离事件中心

This commit is contained in:
Harvey Zack committed 2018-11-09 12:17:19 +08:00
1 parent b5694fea89
commit 1d40d1c46b
31 files changed
+728 -403

No files matched your search

@@ -0,0 +1,15 @@
export default function hoverInit(art, events) {
const { refs: { $player } } = art;
events.hover(
$player,
() => {
$player.classList.add('artplayer-hover');
art.emit('hoverenter');
},
() => {
$player.classList.remove('artplayer-hover');
$player.classList.remove('artplayer-hide-cursor');
art.emit('hoverleave');
}
);
}