mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-24 14:41:20 -08:00
分离includeFromEvent函数
This commit is contained in:
1 parent
d475f26dfb
commit
dd1ae0f499
9 files changed
+42
-22
No files matched your search
@@ -73,3 +73,7 @@ export function isInViewport(el) {
|
||||
const horInView = rect.left <= windowWidth && rect.left + rect.width >= 0;
|
||||
return vertInView && horInView;
|
||||
}
|
||||
|
||||
export function includeFromEvent(event, target) {
|
||||
return event.composedPath && event.composedPath().indexOf(target) > -1;
|
||||
}
|
||||
Reference in new issue
Block a user