tui.layer.active
tui.layer.active [ID]
Returns 0 while any layer is shown, or while a specific layer is shown.
Parameters
ID- (optional) layer id. If provided, checks only that layer; if omitted, checks if any layer is visible.
Returns: 0 if the condition is met, 1 otherwise.
Notes
- A layer is considered active (shown) when it has been made visible with
tui.layer.showand has not been hidden withtui.layer.hideortui.layer.close. - Useful for conditional logic: check if a modal layer is in effect before allowing certain operations.
See also: tui.layer.show, tui.layer.hide, tui.layer.top
