mixins/load

mixin LoadMixin()

Mixin that provides load state functionality.

loading
Type:Boolean

Is true if any loading (not necessarly the inital loading) is still in process. Setting its value is the same as calling setLoading with this value.

setLoading(loading[, delay[, setter]])
In-/Decreses the internal loading counter. May be overloaded to visually represent
the loading process.
Arguments:
  • loading (Bool) – A logical true value will increase the loading count, anything else will decrease it.
  • delay (Number|null) – An optional delay to use for calling the setter.
  • setter (Function) – A function to update the visual loading state. This parameter only to be used by the views extending the BaseView().
Emits loadingDone:
 

When the internal loading counter has reach 0 again.

read-onlyloaded
Type:bool

Is true if the initial loading has finished.

Note

Is to be overidden.

load(callback)

This function is expected to start the inital loading process.

Note

Is to be overidden.

Callback args:
  1. err (Error|null) – A possible error.
Emits loaded:

Once loading has finished after the callback was called.