From e744c41821efff8777aeeabc1d81b6c8504d4f77 Mon Sep 17 00:00:00 2001 From: moklick Date: Wed, 1 Sep 2021 22:37:01 +0200 Subject: [PATCH] refactor(ts): ignore for shadow root elementFromPoint --- src/components/Handle/handler.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/components/Handle/handler.ts b/src/components/Handle/handler.ts index f8cf4794..03fd37df 100644 --- a/src/components/Handle/handler.ts +++ b/src/components/Handle/handler.ts @@ -37,6 +37,8 @@ function checkElementBelowIsValid( isValidConnection: ValidConnectionFunc, 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 elementBelowIsTarget = elementBelow?.classList.contains('target') || false; const elementBelowIsSource = elementBelow?.classList.contains('source') || false; @@ -111,6 +113,7 @@ export function onMouseDown( return; } + // @ts-ignore const elementBelow = doc.elementFromPoint(event.clientX, event.clientY); const elementBelowIsTarget = elementBelow?.classList.contains('target'); const elementBelowIsSource = elementBelow?.classList.contains('source');