Class: GlobalManager

Kekule.Widget. GlobalManager

new GlobalManager()

Source:

Methods

getBelongedResponsiveWidget(element) → {Kekule.Widget.BaseWidget}

Returns widget the element belonged to. The widget must be a non-static one.
Parameters:
Name Type Description
element HTMLElement
Source:
Returns:
Type
Kekule.Widget.BaseWidget

getCurrModalWidget() → {Kekule.Widget.BaseWidget}

Returns current (topmost) modal widget.
Source:
Returns:
Type
Kekule.Widget.BaseWidget

getTopmostLayer(doc) → {HTMLElement}

Get top most layer previous created in document.
Parameters:
Name Type Description
doc HTMLDocument
Source:
Returns:
Type
HTMLElement

hasDialogWidgets()

Return if there is dialog widget in current document.
Source:

hasPopupWidgets()

Return if there is popup widget in current document.
Source:

installWindowEventHandlers(win)

Install event handlers on window object.
Parameters:
Name Type Description
win Window
Source:

mapTouchToPointerEvent(e)

Convert a touch event to corresponding pointer event, useful for browsers that does not support pointer events.
Parameters:
Name Type Description
e Object
Source:

notifyWidgetEventFired(widget, eventName, event)

Notify that a widget on document has fired an event.
Parameters:
Name Type Description
widget Kekule.Widget.BaseWidget
eventName String
event Hash
Source:

preparePopupWidget(popupWidget, invokerWidget, showType)

Prepare before showing popup widget. In this method, popupWidget element will be moved to top most layer and its position will be recalculated.
Parameters:
Name Type Description
popupWidget Kekule.Widget.BaseWidget Widget to be popped up.
invokerWidget Kekule.Widget.BaseWidget Who popped that widget.
showType Int Value from Kekule.Widget.ShowHideType. If showType is DROPDOWN, the new position will be calculated based on invokerWidget.
Source:

registerAutoResizeWidget(widget)

Register an auto-resize widget.
Parameters:
Name Type Description
widget Kekule.Widget.BaseWidget
Source:

registerDialogWidget(widget)

Notify the manager that an dialog widget is shown.
Parameters:
Name Type Description
widget Kekule.Widget.BaseWidget //@param {HTMLElement} element Base element of widget. If not set, widget.getElement() will be used.
Source:

registerModalWidget(widget)

Notify the manager that an dialog widget is shown.
Parameters:
Name Type Description
widget Kekule.Widget.BaseWidget
Source:

registerPopupWidget(widget)

Notify the manager that an popup widget is shown.
Parameters:
Name Type Description
widget Kekule.Widget.BaseWidget //@param {HTMLElement} element Base element of widget. If not set, widget.getElement() will be used.
Source:

uninstallWindowEventHandlers(win)

Uninstall event handlers on window object.
Parameters:
Name Type Description
win Window
Source:

unpreparePopupWidget(widget)

Called after popup widget is hidden.
Parameters:
Name Type Description
widget Kekule.Widget.BaseWidget
Source:

unregisterAutoResizeWidget(widget)

Unregister an auto-resize widget.
Parameters:
Name Type Description
widget Kekule.Widget.BaseWidget
Source:

unregisterDialogWidget(widget)

Notify the manager that an dialog widget is hidden.
Parameters:
Name Type Description
widget Kekule.Widget.BaseWidget //@param {HTMLElement} element Base element of widget. If not set, widget.getElement() will be used.
Source:

unregisterModalWidget(widget)

Notify the manager that an dialog widget is hidden.
Parameters:
Name Type Description
widget Kekule.Widget.BaseWidget
Source:

unregisterPopupWidget(widget)

Notify the manager that an popup widget is hidden.
Parameters:
Name Type Description
widget Kekule.Widget.BaseWidget //@param {HTMLElement} element Base element of widget. If not set, widget.getElement() will be used.
Source:

Events

widgetCreate

Invoked when a widget is created on document. event param of it has field: {widget}.
Source:

widgetFinalize

Invoked when a widget is finalized on document. event param of it has field: {widget}.
Source: