Protected
_containerProtected
_srcUser-provided source code
Protected
_svgUser-provided attributes
Protected
Readonly
_svgProtected
_updateLast src update result
Optional
attrs?: undefinedOptional
id?: undefinedOptional
attrs?: undefinedProtected
Readonly
_useProtected
_useUser-provided attributes
Protected
_updateProtected
_updateProtected
_updateProtected
_updateProtected
_updateProtected
_updateReturns <svg>
element.
To assign attributes, use setSvgElAttrs instead.
<svg>
element
Returns <use>
element.
To assign attributes, use setSvgElAttrs instead.
<use>
element
Mounts image to the given element
Element or selector of an element to mount image to
this
Generated using TypeDoc
Basic SVG image. Implements SVG sprites.
Will create
<svg>
element that contains all symbols, add passed source code to it and reuse it later.Basic usage
Internal API
You can use this API to extend
SvgImage
.Use
constructor()
and SvgImage#mount to change component markup.Use SvgImage._updateSvgBeforeUserAttrsSet, SvgImage._updateSvgAfterUserAttrsSet, SvgImage._updateUseElBeforeUserAttrsSet, SvgImage._updateUseElAfterUserAttrsSet hooks to set custom elements attributes.
You probably don't need to override required element's attributes. If you actually need to do so, override SvgImage._updateSvgEl
Param: src
SVG source code
Param: mountTo
Element or selector of an element to mount image to. If not provided, image won't be mounted.