Methods
scadavisInit(containeropt, iframeparamsopt, svgurlopt, paramsobjopt) → {Object}
Initialization of the library via promise. Only available for version 2+.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
container |
string |
<optional> |
ID of the container object. If empty or null the iframe will be appended to the body. |
iframeparams |
string |
<optional> |
Parameter string for configuring iframe (excluding id and src and sandbox) e.g. 'frameborder="0" height="250" width="250"'. |
svgurl |
string |
<optional> |
URL for the SVG file. |
paramsobj |
Object |
<optional> |
Alternatively parameters can be passed in an object. |
- Source:
Returns:
Returns a promise with the scadavis object as a parameter. The promise resolves after the svg file is preprocessed (if an SVG file was specified) or after the component is loaded.
Example usage: scadavisInit( {container: "div1", svgurl: "file.svg"} ).then(function (sv) { ... });
- Type
- Object