mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-03-26 22:49:01 +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 parent: HTMLElement | null = element;
|
||||||
let zIndex: undefined | number;
|
let zIndex: undefined | number;
|
||||||
do {
|
do {
|
||||||
let currentZIndex = parseInt(parent!.style.zIndex);
|
let currentZIndex = parseInt(getComputedStyle(parent).zIndex);
|
||||||
|
|
||||||
// searching the shallowest z-index
|
// searching the shallowest z-index
|
||||||
if (!isNaN(currentZIndex)) zIndex = currentZIndex;
|
if (!isNaN(currentZIndex)) zIndex = currentZIndex;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user