mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-02-11 09:38:44 +08:00
[ts][wecomponents] Use computed style to determine overlay z-index.
This commit is contained in:
parent
4acd202f41
commit
158a4922cd
@ -1008,7 +1008,7 @@ export class SpineWebComponentOverlay extends HTMLElement implements OverlayAttr
|
||||
let parent: HTMLElement | null = element;
|
||||
let zIndex: undefined | number;
|
||||
do {
|
||||
let currentZIndex = parseInt(parent!.style.zIndex);
|
||||
let currentZIndex = parseInt(getComputedStyle(parent).zIndex);
|
||||
|
||||
// searching the shallowest z-index
|
||||
if (!isNaN(currentZIndex)) zIndex = currentZIndex;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user