new H_ui_window()
ui.js, line 968
Members
-
close
-
Sets the close button for the modal window.
-
current_open_z_indexnumber
-
Current open z-index for modals.
-
modal
-
Adds or removes the modal mask as needed.
-
visible
-
Gets the visibility state of the modal window.
-
zindex
-
Change the zindex for the modal and overlay
Methods
-
hide(at_start)
ui.js, line 1213 -
Hides the modal window.
Optionally triggers on_close callback.Name Type Default Description at_startboolean false optional If true, hides at start. -
mutation(records)
ui.js, line 1158 -
Mutation observer callback for modal content changes.
Name Type Description recordsArray Mutation records. -
on_double_click_mask(event)
ui.js, line 1275 -
Handles double click on the modal mask.
Hides the modal.Name Type Description eventEvent The double click event. -
on_key_press(evt)
ui.js, line 1081 -
Handles key press events for the modal.
Closes modal on ESC key.Name Type Description evtKeyboardEvent The keyboard event. -
remove()
ui.js, line 1253 -
Removes the modal window from the DOM.
Cleans up event handlers and observers. -
set_alignment(align_vertical, align_horizontal)
ui.js, line 1175 -
Sets the alignment of the modal window.
Name Type Description align_verticalnumber Vertical alignment. align_horizontalnumber Horizontal alignment. -
set_content(content)
ui.js, line 1094 -
Sets the content of the modal window.
Accepts string, DOM element, or array.Name Type Description contentstring | HTMLElement | Array Content to display. -
set_parent(parentNode, align_horizontal, align_vertical)
ui.js, line 1142 -
Sets the parent node for the modal window. Optionally aligns the modal.
Name Type Description parentNodeHTMLElement Parent node. align_horizontalnumber optional Horizontal alignment. align_verticalnumber optional Vertical alignment. -
set_title(title)
ui.js, line 1117 -
Sets the title of the modal window if it's set in the settings
Accepts string, DOM element, or array.Name Type Description titlestring | HTMLElement | Array Content to display. -
show()
ui.js, line 1232 -
Shows the modal window.
Makes the modal visible and brings it to front. -
toggle()
ui.js, line 1199 -
Toggles the modal window's visibility.
Shows or hides the modal. -
update_scroll_position()
ui.js, line 1185 -
Updates the scroll position of the modal window.
Adjusts top position if the page is scrolled. -
staticH_ui_window.handle_key_press(evt)
ui.js, line 1358 -
Handle key event for all the modal, determine wich modal will receive the event. (generally the last opened)
Name Type Description evtKeyboardEvent