Skip to content

Commit

Permalink
fix: wrong layer z-axis position in Picker (DAP-4755) (#19)
Browse files Browse the repository at this point in the history
  • Loading branch information
Ni-2 authored Sep 13, 2024
1 parent f6d376a commit 9aa66c8
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions libs/engine/src/app/components/picker-highlighter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,12 @@ import { Highlighter } from './highlighter'
const DEFAULT_INACTIVE_BORDER_COLOR = '#384BFF4D' // light blue
const DEFAULT_CHILDREN_BORDER_STYLE = 'dashed'

const getElementDepth = (el: Element | ShadowRoot | null | undefined) => {
const getElementDepth = (el: Element | Node | ShadowRoot | null | undefined) => {
let depth = 0

while (el) {
depth++
el = el instanceof ShadowRoot ? el.host : el.parentElement
el = el instanceof ShadowRoot ? el.host : el.parentNode
}

return depth
}

Expand Down

0 comments on commit 9aa66c8

Please sign in to comment.