Fork me on GitHub

Namespace: LayoutManager

LayoutManager

Dialog and layout setup with helper functions
Source:

Members

(static) Stages

The array/list of all the stages.
Source:

(static) _cascade_dialog_base_z_index

The base z-index to use for cascading dialogs
Source:

(static) _main_container

a reference to the main body container that holds the boxes/stages.
Source:

(static) box_size

The calculated size of each box/stage, changes when .Initialize() is called.
Source:

(static) maxSize

The maximum size of a stage
Source:

(static) minSize

The minimum size of a stage
Source:

(static) stages_count

The number of stages to create
Source:

Methods

(static) CascadeDialogs(cascade_start, cascade_end, offset_x, offset_y)

Positions dialogs in a cascaded layout from the top right to the bottom left. All dialogs by default, otherwise for a given range.
Parameters:
Name Type Description
cascade_start integer the dialog to start cascading with.
cascade_end integer the last dialog to cascade.
offset_x Number the distance between each cascaded dialog in x.
offset_y Number the distance between each cascaded dialog in y.
Source:

(static) DialogAddClass(stage, className)

Adds the given class to the dialog element associated to the given stage.
Parameters:
Name Type Description
stage * the stage
className string the class name
Source:

(static) GetDialogForStage(stage, inner)

Gets the dialog element for the given stage.
Parameters:
Name Type Description
stage * the stage
inner Boolean Specify true to get the inner element that is used for jQuery.dialog().
Source:
Returns:
The associated dialog element for the given stage.

(static) Initialize()

Sets up the stage dialogs and menubar. This only needs to be called only once.
Source:

(static) IsStageVisible(stage)

Determines if a given stage is visible to the user (as defined by https://api.jquery.com/visible-selector/)
Parameters:
Name Type Description
stage * the (konva) stage to test visibility
Source:
Returns:
true if visible, false otherwise

(static) RestoreDialogs(start, end)

Restores dialogs. All dialogs by default, otherwise for a given range.
Parameters:
Name Type Description
start integer the dialog to start tiling with.
end integer the last dialog to tile.
Source:

(static) SetDialogTitle(stage, title)

Sets the title on the dialog window of a given stage.
Parameters:
Name Type Description
stage object the stage.
title string the title to set.
Source:

(static) TileDialogs(tile_start, tile_end)

Positions dialogs in a tiled layout. All dialogs by default, otherwise for a given range.
Parameters:
Name Type Description
tile_start integer the dialog to start tiling with.
tile_end integer the last dialog to tile.
Source:

(static) __GetOptimalBoxWidth(considerViewportHeight, vpFootOffset, titlebarHeight)

Calculated the size to use for each drawing box/stage. Edit the values in the functions to change the box sizing.
Parameters:
Name Type Description
considerViewportHeight Boolean Whether or not the box height can be reduced to fit the client area.
vpFootOffset Number The amount of space to further offset at the bottom of the client area.
titlebarHeight Number The height of a dialog's titlebar (used for calculations).
Source:
Returns:
The size to use.

(static) __isDialogForStage(dialogElement, stage)

Determines whether the given dialog is associated with the given stage.
Parameters:
Name Type Description
dialogElement * The dialog.
stage * The stage.
Source:
Returns:
True if they are associated, false otherwise.

(static) __newStageDialog(parentContainer, startMinimized)

[Private] Creates a DOM element to be used for a stage dialog.
Parameters:
Name Type Description
parentContainer * the DOM element of the parent container in which to add a stage dialog.
startMinimized * Whether or not the dialog should start minimized.
Source:

(static) __visible_stages()

Prints whether each stage is visible or not to the user in the web console. Useful for debugging.
Source:

↑ Top