+3





![autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>](/assets/img/avatar_default.png)



Coding On Star
GitHub
CodingOnStar
autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
lif
hjlarry
Stephen Zhou
tmimmanuel
Desel72
Renzo
Krishna Chaitanya
yyh
Copilot
7fbb1c96db
Co-authored-by: CodingOnStar <[email protected]> Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> Co-authored-by: lif <[email protected]> Co-authored-by: hjlarry <[email protected]> Co-authored-by: Stephen Zhou <[email protected]> Co-authored-by: tmimmanuel <[email protected]> Co-authored-by: Desel72 <[email protected]> Co-authored-by: Renzo <[email protected]> Co-authored-by: Krishna Chaitanya <[email protected]> Co-authored-by: yyh <[email protected]> Co-authored-by: Copilot <[email protected]>
11 lines
342 B
TypeScript
11 lines
342 B
TypeScript
export const getHoveredParallelId = (relatedTarget: EventTarget | null) => {
|
|
const element = relatedTarget as Element | null
|
|
if (element && 'closest' in element) {
|
|
const closestParallel = element.closest('[data-parallel-id]')
|
|
if (closestParallel)
|
|
return closestParallel.getAttribute('data-parallel-id')
|
|
}
|
|
|
|
return null
|
|
}
|