添加画质控制器

This commit is contained in:
Harvey Zack committed 2018-11-01 14:41:32 +08:00
1 parent c118c407fc
commit a4876e6c73
9 files changed
+129 -12

No files matched your search

+6
View File
@@ -3,6 +3,7 @@ export default class Events {
this.art = art;
this.destroyEvents = [];
this.proxy = this.proxy.bind(this);
this.hover = this.hover.bind(this);
}
proxy(target, name, callback, option = {}) {
@@ -16,6 +17,11 @@ export default class Events {
});
}
hover(target, mouseenter, mouseleave) {
this.proxy(target, 'mouseenter', mouseenter);
this.proxy(target, 'mouseleave', mouseleave);
}
destroy() {
this.destroyEvents.forEach(event => event());
}