mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-26 08:51:20 -08:00
分离includeFromEvent函数
This commit is contained in:
1 parent
d475f26dfb
commit
dd1ae0f499
9 files changed
+42
-22
No files matched your search
@@ -1,3 +1,5 @@
|
||||
import { includeFromEvent } from '../utils';
|
||||
|
||||
export default function clickInit(art, events) {
|
||||
const {
|
||||
controls,
|
||||
@@ -5,7 +7,7 @@ export default function clickInit(art, events) {
|
||||
} = art;
|
||||
|
||||
events.proxy(document, ['click', 'contextmenu'], (event) => {
|
||||
if (event.composedPath && event.composedPath().indexOf($player) > -1) {
|
||||
if (includeFromEvent(event, $player)) {
|
||||
art.isFocus = true;
|
||||
art.emit('focus');
|
||||
} else {
|
||||
|
||||
Reference in new issue
Block a user