PrizmDoc v13.0 - Updated
Module: svg-icons

Module: svg-icons

This module appends the icons to the document body. If this module is initialized twice, the icons are not appended since they only need to be appended once.

Members

(inner) moduleApi

Properties:
Name Type Description
destroy function

Destroys the module.

Methods

init() → {module:svg-icons~moduleApi}

Initializes the module. This method will insert the SVG icon sprite into the body of the page. This sprite can be shared between multiple instances of the viewer embedded on the same page.

Returns:

The module API object.

Type
module:svg-icons~moduleApi

parseIcons(dom)

Parses icons. For any HTML template that contains icons, this method must be called with the HTML template passed as the parameter. Note that the init method must be called before calling parseIcons.

Parameters:
Name Type Description
dom HTMLElement

A parent DOM element, or jQuery-wrapped element, that contains the icons that need to be parsed.