Returns whether this layer is part of the layer stack and can be interacted with.
A layer that is alive can be targeted with fragment changes, or queried for containing elements.
The root layer is always alive. An overlay is alive as soon as it enters the DOM, even when it is still playing its opening animation.
An overlay becomes "unalive" immediately when it starts closing. If the closing is animated, a layer is considered "unalive" while closing animation is still playing.
Overlay state | up.Layer#isAlive() |
---|---|
Entered DOM | true |
Opening animation playing | true |
Opened | true |
Closing animation playing | false |
Removed from DOM | false |
.up-destroying
class is automatically assigned to elements in their exit animation.up.fragment
functions (like up.fragment.get()
) ignore elements in their exit animation.up.fragment.isAlive()
function checks if an element is attached to the DOM and also not in an exit animation.Whether this layer is considered alive.