Creates JavaScript Organizational Chart Control
OrgDiagram
OrgDiagram(element, options)
Creates JavaScript Organizational Chart Control
Returns: OrgDiagram - returns reference to organizational chart control. since control adds event listeners bound to its contents, call destroy method to clean up everything.
| Param | Type | Default | Description |
|---|---|---|---|
element |
object | `` | Reference to placeholder div element in the DOM. The control renders diagram content inside of that div element and adds events listeners. |
options |
OrgConfig | `` | Organizational Chart Configuration object |
destroy()
Removes all elements control added to DOM including event listeners.
getItemPosition(itemId)
This method returns item position relative to the control's element.
Returns: Rect - returns item position
getOption(option)
This method returns configuration option by name.
| Param | Type | Default | Description |
|---|---|---|---|
option |
* | `` | Option name |
getOptions()
This method returns current configuration object.
Returns: object - returns reference to current configuration object
setOption(option, value)
Sets configuration option of the control by name.
| Param | Type | Default | Description |
|---|---|---|---|
option |
* | `` | Option name |
value |
* | `` | Option value |
setOptions(options)
Call this method to update controls configuration. Control uses default Config instance to initialize itself, so it sets only options provided in the options parameter.
| Param | Type | Default | Description |
|---|---|---|---|
options |
object | `` | Options |
update(updateMode, forceCenterOnCursor)
Performs full redraw of the diagram contents via reevaluating all API options. This method has to be called explicitly after all options are set in order to update controls contents.
| Param | Type | Default | Description |
|---|---|---|---|
updateMode |
UpdateMode | `` | update Mode |
forceCenterOnCursor |
boolean | `` | force Center On Cursor |
Creates JavaScript Family Diagram Control
FamDiagram
FamDiagram(element, options)
Creates JavaScript Family Diagram Control
Returns: FamDiagram - returns reference to family diagram control. since control adds event listeners bound to its contents, call destroy method to clean up everything.
| Param | Type | Default | Description |
|---|---|---|---|
element |
object | `` | Reference to placeholder div element in the DOM. The control renders diagram content inside of that div element and adds events listeners. |
options |
FamConfig | `` | Family Diagram Configuration object |
destroy()
Removes all elements control added to DOM including event listeners.
getItemPosition(itemId)
This method returns item position relative to the control's element.
Returns: Rect - returns item position
getOption(option)
This method returns configuration option by name.
| Param | Type | Default | Description |
|---|---|---|---|
option |
* | `` | Option name |
getOptions()
This method returns current configuration object.
Returns: object - returns reference to current configuration object
setOption(option, value)
Sets configuration option of the control by name.
| Param | Type | Default | Description |
|---|---|---|---|
option |
* | `` | Option name |
value |
* | `` | Option value |
setOptions(options)
Call this method to update controls configuration. Control uses default Config instance to initialize itself, so it sets only options provided in the options parameter.
| Param | Type | Default | Description |
|---|---|---|---|
options |
object | `` | Options |
update(updateMode, forceCenterOnCursor)
Performs full redraw of the diagram contents via reevaluating all API options. This method has to be called explicitly after all options are set in order to update controls contents.
| Param | Type | Default | Description |
|---|---|---|---|
updateMode |
UpdateMode | `` | update Mode |
forceCenterOnCursor |
boolean | `` | force Center On Cursor |