The loading class offer you the possibility to add loading bar overall hide the initialization and make sure the user see the progress.

How to Initialize the Loading?


To initialize the Menu Overlay simply call the function AddOverAllLoading from the EGE group.



Class Details


Enumerations:


Name

List

Description

LoadingTypes

  • OVERALL_LOADING

This is used to defined the input type in SetLoadingType.



Functions:


       Initialization & Main Functions

Name

Arguments

Return

Description

Init

  • String: BaseID - HMTL ID defining the position in the DOM of the tab. (Automatically set by AddOverAllLoading).
  • String: RegistryName - Name that define this overlay, all children IDs will start by this.

VOID

This function Initialized every part of the viewer: HMTL, CSS, Data, Events, etc...

It will be generated in the defined ID and all HTML IDs used for this  will start by the RegistryName defined in arguments.

Launch

  • Function: Callback - Function called when everything is loaded.
  • Integer: Time - Time the loading take fade out.

VOID

Launch all systems required by the this and will call all children launch. And load the animation (if set).


Functionalities


Name

Arguments

Return

Description

AddLoadingBar

  • Function: Callback - Function called when everything is loaded.

VOID

Call this function to add a LoadingBar to this loading systems.

SetMaxStep

  • Integer: Max

VOID

Set how many steps the loading has.

Step

  • @Nullable Integer: Step

VOID

Call this function to specified which step you are, if you're not defining the step it will just increment by one.


If the step value goes the maximum it will consider as done and the loading will fade out.


Setters Functions

Name

Arguments

Return

Description

SetLoadingType

  • LoadingTypes: Type - Specified the type.

VOID

Setup the type of loading, for now only OVERALL_LOADING is available, it is use to cover everything and allow EGE to load behind.

SetBackgroundRGB

  • Integer: R - Red
  • Integer: G - Green
  • Integer: B - Blue

VOID

Setup the background color.

SetBackgroundHex

  • String: Hex - Color hexa

VOID

Setup the background color.

SetBackgroundColorName

  • @CSS String: Name - Color

VOID

Setup the background color.

SetBackgroundImage

  • String: URL - link of the image

VOID

Setup the background image.

SetLoadingBackColor

  • @CSS String: Color - Color

VOID

Set loading bar back color (unload part).

SetLoadingFrontColor

  • @CSS String: Color - Color

VOID

Set loading bar front color (load part).

SetAnimationGIF

  • String: URL - link of the animation

VOID

Set a loading animation (GIF).


Note: it might be heavy


Accessor Functions

Name

Arguments

Return

Description

GetLoadingBar

  • None

LoadingBar

Get the LoadingBar from the class if you want to modify some settings


Private Details



All private details are usable but its recommended to not use any of those. It might modify the proper functioning of the class.


Variables (Members):


       Main Members

Name

Type

Default Value

Description

id

String

undefined

Global HMTL Id of the viewer (# + name).

registryName

String

undefined

Name of this overlay.

basedId

String

undefined

Where it is located is the existing DOM (its parent).

step

Integer

0

Actual step

maxStep

Integer

1

Maximum step (above it will close the loading).



Information

Name

Type

Default Value

Description

loadingType

LoadingTypes

OVERALL_LOADING

Hold the type of this loading system.

backgroundURL

String

null

Hold the background image link (if any).

loadingBar

LoadingBar

null

Hold the LoadingBar class (if any)

hasAnimation

Boolean

false

Used to check if there is an animated GIF.

animationURL

String

null

Link of the animated GIF.



Functions:        

LoadingBar Functions

Name

Arguments

Return

Description

AddLoadingBarCallback

  • None

None

This function is called by AddLoadingBar to setup the loading bar at the middle.


Util Functions

Name

Arguments

Return

Description

GetCenterID

  • None

String

Return the center div ID.

GetAnimationID

  • None

String

Return the animation div ID.

Compatibility



LANGUAGE CLASS: Not compatible.

Created with the Personal Edition of HelpNDoc: Easy EBook and documentation generator