This is a proof-of-concept widget introduced in version 1.0.56 that can be used to render SVG images from externally
loaded source files. In future releases a full-suite of icons will be made available out-of-the-box but for the
current version there are only two icons defined and they are not guaranteed to remain available in future releases
until the final icon suite has been determined.
- Since:
- 1.0.56
- Copyright:
- Copyright (C) 2005-2020 Alfresco Software Limited
- License:
- GNU Lesser General Public License, see: Open Source Licensing
- Source:
Extends
Mixes In
- external:dojo/_TemplatedMixin
- module:alfresco/core/Core
Members
-
cssRequirements :object[]
-
An array of the CSS files to use with this widget.
Type:
- object[]
- Default Value:
- [{cssFile:"./css/SVGImage.css"}]
- Source:
-
description :string
-
For accessibility reasons it makes sense to describe what the image looks like. This is particularly important for the visually impaired.
Type:
- string
- Source:
-
height :string
-
The height of the image. This can have any value of units provided, but if no units are set then "px" will be assumed.
Type:
- string
- Default Value:
- null
- Source:
-
source :string
-
An external source file can be specified that will load the asynchronously load the SVG data for rendering an image. This source file should have one or more
elements defined in it. The source file is expected to start with an AMD package name (e.g. "alfresco/html/svg/core.svg"). Type:
- string
- Default Value:
- null
- Source:
-
symbolId :string
-
This is the identifier of the SVG
element to render. Type:
- string
- Default Value:
- null
- Source:
-
templateString :String
-
The HTML template to use for the widget.
Type:
- String
- Source:
-
useClass :String
-
An optional class that can be used to specialise the CSS rules that can be applied to an instance of an SVG. If not specified, it will be auto-generated.
Type:
- String
- Since:
- 1.0.67
- Default Value:
- null
- Source:
Methods
-
onClick(evt)
-
Called when the user clicks on the SVG image.
Parameters:
Name Type Description evt
object The click event object - Source:
-
postCreate()
-
- Source:
-
postMixInProperties()
-
- Source:
-
processDimension(value) → {strung}
-
Parameters:
Name Type Description value
string | number The value to process. - Source:
Returns:
The processed value.- Type
- strung