Module: TagPreview

Functions exported by the TagPreview module.
Source:

Members

(static, readonly) Font :string

A possible font that can be set in a tag view.
Type:
  • string
Properties:
Name Type Description
ENGRAVE string Default tag editor font, only reliable for the ASCII range using Latin letters.
UNICODE string More complete font, featuring a wide selection of Unicode glyphs.
Source:

Methods

(static) createSideView(options) → {Promise.<SideView>}

Creates a new tag editor side view asynchronously, binding to the given canvas element.
Parameters:
Name Type Description
options Object the options for the side view
Properties
Name Type Attributes Default Description
canvasElement Element | jQuery the <canvas> DOM element or jQuery object
side string <optional>
SIDE1 the side; "SIDE1" for side 1 or "SIDE2" for side 2
zoomer Zoomer <optional>
the zoomer object to be used by this view; if not set, one is created
Source:
Returns:
promise resolved with the created SideView after the operation completes
Type
Promise.<SideView>

(static) createTwoSideView(options) → {Promise.<TwoSideView>}

Creates a two-side view without toolbars, given two canvas elements for side 1 and side 2.
Parameters:
Name Type Description
options Object the two-side view creation options
Properties
Name Type Attributes Description
side1CanvasElement Element | jQuery the side 1 <canvas> DOM element or jQuery object
side2CanvasElement Element | jQuery the side 2 <canvas> DOM element or jQuery object
zoomer Zoomer <optional>
the zoomer object to be used by this view; if not set, one is created
Source:
Returns:
promise resolved with the created TwoSideView after the operation completes
Type
Promise.<TwoSideView>

(static) createZoomer() → {Promise.<Zoomer>}

Creates a Zoomer object, which provides zoom in/out/reset zoom functionality for tag views.
Source:
Returns:
promise resolved with the created Zoomer after the operation completes
Type
Promise.<Zoomer>