SVG primitive properties

This primitive aims to draw an image with a provided svg url.

Properties

url

TypeDefault valueSupported value
stringnullNot 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 nameTypeDefault valueSupported value
eventstringNot applicable[“svgLoaded”, “svgLoadError”]
callbackfunctionNot applicableNot applicable

off

A function that will remove the registered callback. If no callback is registered, display a warning to the user.

Arguments nameTypeDefault valueSupported value
eventstringNot 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.