refactor(ts): ignore for shadow root elementFromPoint
This commit is contained in:
@@ -37,6 +37,8 @@ function checkElementBelowIsValid(
|
|||||||
isValidConnection: ValidConnectionFunc,
|
isValidConnection: ValidConnectionFunc,
|
||||||
doc: Document | ShadowRoot
|
doc: Document | ShadowRoot
|
||||||
) {
|
) {
|
||||||
|
// TODO: why does this throw an error? elementFromPoint should be available for ShadowRoot too
|
||||||
|
// @ts-ignore
|
||||||
const elementBelow = doc.elementFromPoint(event.clientX, event.clientY);
|
const elementBelow = doc.elementFromPoint(event.clientX, event.clientY);
|
||||||
const elementBelowIsTarget = elementBelow?.classList.contains('target') || false;
|
const elementBelowIsTarget = elementBelow?.classList.contains('target') || false;
|
||||||
const elementBelowIsSource = elementBelow?.classList.contains('source') || false;
|
const elementBelowIsSource = elementBelow?.classList.contains('source') || false;
|
||||||
@@ -111,6 +113,7 @@ export function onMouseDown(
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// @ts-ignore
|
||||||
const elementBelow = doc.elementFromPoint(event.clientX, event.clientY);
|
const elementBelow = doc.elementFromPoint(event.clientX, event.clientY);
|
||||||
const elementBelowIsTarget = elementBelow?.classList.contains('target');
|
const elementBelowIsTarget = elementBelow?.classList.contains('target');
|
||||||
const elementBelowIsSource = elementBelow?.classList.contains('source');
|
const elementBelowIsSource = elementBelow?.classList.contains('source');
|
||||||
|
|||||||
Reference in New Issue
Block a user