mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-28 18:41:20 -08:00
add autoMin
This commit is contained in:
1 parent
33a7e1193d
commit
b202c21a7f
11 files changed
+150
-18
No files matched your search
@@ -3,6 +3,7 @@ import hoverInit from './hoverInit';
|
||||
import mousemoveInit from './mousemoveInit';
|
||||
import resizeInit from './resizeInit';
|
||||
import gestureInit from './gestureInit';
|
||||
import viewInit from './viewInit';
|
||||
|
||||
export default class Events {
|
||||
constructor(art) {
|
||||
@@ -18,13 +19,14 @@ export default class Events {
|
||||
mousemoveInit(art, this);
|
||||
resizeInit(art, this);
|
||||
gestureInit(art, this);
|
||||
viewInit(art, this);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
proxy(target, name, callback, option = {}) {
|
||||
if (Array.isArray(name)) {
|
||||
return name.map(item => this.proxy(target, item, callback, option));
|
||||
return name.map((item) => this.proxy(target, item, callback, option));
|
||||
}
|
||||
|
||||
target.addEventListener(name, callback, option);
|
||||
@@ -67,6 +69,6 @@ export default class Events {
|
||||
}
|
||||
|
||||
destroy() {
|
||||
this.destroyEvents.forEach(event => event());
|
||||
this.destroyEvents.forEach((event) => event());
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user