This commit is contained in:
Harvey Zack committed 2018-11-12 10:00:55 +08:00
1 parent eed28c1d21
commit 7f1e1dc255
10 files changed
+44 -89

No files matched your search

@@ -0,0 +1,7 @@
export default function doubleClickInit(art, events) {
const { refs: { $player } } = art;
events.proxy($player, 'dblclick', () => {
art.player.fullscreenToggle();
art.emit('dblclick');
});
}
+2
View File
@@ -2,6 +2,7 @@ import clickInit from './clickInit';
import hoverInit from './hoverInit';
import mousemoveInit from './mousemoveInit';
import resizeInit from './resizeInit';
import doubleClickInit from './doubleClickInit';
export default class Events {
constructor(art) {
@@ -12,6 +13,7 @@ export default class Events {
hoverInit(art, this);
mousemoveInit(art, this);
resizeInit(art, this);
doubleClickInit(art, this);
}
proxy(target, name, callback, option = {}) {