ibm_ilog.graphlayout.LightVersion
Loads a "light" version of the ibm_graphlayout module used only to run graph layouts on a web server or in a web worker.
Examples:
Example 1
dojo.require('ibm_ilog.graphlayout.LightVersion').load();Method Summary
- load(classesToLoad, classesNotToLoad) Loads a "light" version of the ibm_graphlayout module used only to run graph layouts on a web server or in a web worker.
Methods
This function prevents some classes in the ibm_graphlayout
module
from being loaded when they are not needed.
This is useful when an application knows that it will only execute
graph layout algorithms on a remote web server
(using the ibm_diagram.graphlayout.ServerSideLayout
class)
or in a Web Worker thread
(using the ibm_diagram.graphlayout.WebWorkerLayout
class).
In these cases, only the public classes of the graph layout modules are necessary
(for example, the ibm_graphlayout.tree.TreeLayout
class) to configure the layout
on the client, but the helper classes containing the actual implementation of the layout
(like ibm_graphlayout.tree.TGraph
, etc) do not need to be loaded.
This function must be called before all other ibm_graphlayout
requires,
so it is recommended to call it immediately after the dojo.require
call as shown in the
example.
Note: Once this function has been called, it is not possible any more to execute a graph layout on the client. If your application may execute graph layout both on the client and on a server/in a web worker, do not call this function. It is never necessary to call this function: its purpose is only to reduce the download size of an application that does server-side or web worker layout only.
Parameter | Type | Description |
---|---|---|
classesToLoad | Array | Specifies a set of classes that must actually be loaded. By default, the load() function uses a predefined set of classes that will work in most cases, but in some cases you may need to force additional classes to be loaded. You can do this by passing the class names in the classesToLoad array. This is an advanced option. You should normally just call load(). |
classesNotToLoad | Array | Specifies the set of classes that must not be loaded. By default, the load() function uses a predefined set of classes that will work in most cases, but you may want to specify the classes not to be loaded yourself. Note that this argument will completely replace the default classes not to be loaded. This is an advanced option. You should normally just call load(). |