优化自动隐藏controls

This commit is contained in:
Harvey committed 2021-05-20 09:37:14 +08:00
1 parent ce56c680da
commit be3d97bf75
6 files changed
+36 -75

No files matched your search

+1 -10
View File
@@ -1,10 +1,7 @@
import { addClass, removeClass } from '../utils';
export default function hoverInit(art, events) {
const {
controls,
template: { $player },
} = art;
const { $player } = art.template;
events.hover(
$player,
@@ -17,10 +14,4 @@ export default function hoverInit(art, events) {
art.emit('hover');
},
);
art.on('hover', (value) => {
if (!value) {
controls.delayHide();
}
});
}