SVG primitive properties
This primitive aims to draw an image with a provided svg url.
Properties
url
Type | Default value | Supported value |
---|---|---|
string | null | Not applicable |
Describes path url to the sprites image source.
Methods
on
A function that will register one and only one callback. Registering a new callback will erase the previous registered one and display a warning to the user.
Arguments name | Type | Default value | Supported value |
---|---|---|---|
event | string | Not applicable | [“svgLoaded”, “svgLoadError”] |
callback | function | Not applicable | Not applicable |
off
A function that will remove the registered callback. If no callback is registered, display a warning to the user.
Arguments name | Type | Default value | Supported value |
---|---|---|---|
event | string | Not applicable | [“svgLoaded”, “svgLoadError”] |
Function
_onLoaded
Function that is executed on when the svg is loaded by the renderer. It executes the “svgLoaded” callback. If no callback is provided, no error should occur.
_onLoadError
Function that is executed on when the svg failed to be loaded by the renderer. It executes the “svgLoadError” callback. If no callback is provided, no error should occur.