mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-29 02:51:20 -08:00
update docs
This commit is contained in:
1 parent
84c84e4cda
commit
e3e42eb399
115 files changed
+279
-598
No files matched your search
@@ -1,4 +1,4 @@
|
||||
import { throttle } from '../utils';
|
||||
import { debounce } from '../utils';
|
||||
|
||||
export default function resizeInit(art, events) {
|
||||
const { option, constructor } = art;
|
||||
@@ -12,7 +12,7 @@ export default function resizeInit(art, events) {
|
||||
notice.show = '';
|
||||
});
|
||||
|
||||
const resizeFn = throttle(() => art.emit('resize'), constructor.RESIZE_TIME);
|
||||
const resizeFn = debounce(() => art.emit('resize'), constructor.RESIZE_TIME);
|
||||
events.proxy(window, ['orientationchange', 'resize'], () => resizeFn());
|
||||
if (screen && screen.orientation && screen.orientation.onchange) {
|
||||
events.proxy(screen.orientation, 'change', () => resizeFn());
|
||||
|
||||
Reference in new issue
Block a user