public class ModalBackDrop extends Object
this class can track the overlay across the page and all opened modals and it adjust its position whenever a modal is opened or closed
| Modifier and Type | Field and Description |
|---|---|
static int |
INCREMENT
the z-index increment for every modal open
|
static elemental2.dom.HTMLDivElement |
INSTANCE
The single instance of the overlay backdrop element
|
| Constructor and Description |
|---|
ModalBackDrop() |
| Modifier and Type | Method and Description |
|---|---|
static boolean |
allOpenedNotModals() |
static void |
closePopovers()
Close all currently open
Popovers |
static boolean |
contains(BaseModal modal) |
static boolean |
contains(Popover popover) |
static Integer |
getNextZIndex() |
static void |
onScrollClosePopovers()
Automatically close all
Popovers when the page is scrolled |
static int |
openedModalsCount() |
static void |
popModal(BaseModal modal) |
static void |
popPopOver()
remove the popover on top of queue from the tracked modals and to increment the overlay z-index
|
static void |
push(BaseModal modal) |
static void |
push(Popover popover) |
static void |
showHideBodyScrolls() |
static void |
toNextZIndex()
Increment the z-index by the
INCREMENT |
public static final int INCREMENT
public static final elemental2.dom.HTMLDivElement INSTANCE
public static boolean contains(BaseModal modal)
modal - BaseModalpublic static void push(BaseModal modal)
public static void popModal(BaseModal modal)
modal - BaseModal to be removed from the tracked modals and to increment the
overlay z-indexpublic static boolean contains(Popover popover)
popover - Popoverpublic static void push(Popover popover)
popover - Popover to be tracked by this ModalBackDrop and to increment the overlay
z-indexpublic static void popPopOver()
public static Integer getNextZIndex()
public static void toNextZIndex()
INCREMENTpublic static void closePopovers()
Popoverspublic static void onScrollClosePopovers()
Popovers when the page is scrolledpublic static int openedModalsCount()
public static boolean allOpenedNotModals()
public static void showHideBodyScrolls()
Copyright © 2019–2022 Dominokit. All rights reserved.