API Docs for: 0.6.0
Show:

sgvizler.loader Class

Defined in: src/loader.js:2

Loads dependencies for external functions.

Dependencies:

  • sgvizler.util
  • sgvizler.logger
  • sgvizler.registry
  • jQuery
  • google.load

Item Index

Properties

Methods

loadDependencies

(
  • functions
)
jQuery.Promise protected

Defined in src/loader.js:106

Available since 0.6.0

Load the dependencies of all the given function names---as specified in sgvizler.registry.

Parameters:

  • functions Array | String

    A list of function names (or just a single function name) to load dependencies for.

Returns:

jQuery.Promise:

A promise object which resolves the loading of all function dependencies.

Example:

loadDependencies('google.visualization.Map'); returns deferred which will load the dependencies for the google.visualization.Map function as specified by sgvizler.registry.

loadGMapScript

() jQuery.Promise private

Defined in src/loader.js:83

Available since 0.6.0

Returns:

jQuery.Promise:

Promise object which resolves the loading of google.maps.

loadGVizScript

(
  • [packages]
  • [loadLib]
)
jQuery.Promise private

Defined in src/loader.js:40

Available since 0.6.0

Parameters:

  • [packages] Array optional

    List of google.visualization packages to load.

  • [loadLib] Boolean optional

    True if google.visualization should be loaded even if packages array is empty. This is needed in order to load the DataTable class, which belongs to no package.

Returns:

jQuery.Promise:

Promise object which resolves the loading of the given packages/library.

Properties

loaders

Object private

Defined in src/loader.js:27

Available since 0.6.0

Contains a list of dependency loaders: function name--deferred pairs. Keeps track of dependencies which have already been asked for (but possibly not been loaded yet).