Home Manual Reference Source Repository
public class | source

MoneySpan

Represents an element which renders a monetary value.

Constructor Summary

Public Constructor
public

constructor(money: js-money, easyCurrency: src/plugins/easycurrency/main.js~EasyCurrency)

Create a new MoneySpan instance.

Member Summary

Private Members
private

_easyCurrency: src/plugins/easycurrency/main.js~EasyCurrency

private

_element: DOMNode

private

Method Summary

Public Methods
public

Destroys this MoneySpan.

public

getElement(): DOMNode

Retrieves the element this money span is attached to.

public

render()

Re-render the element.

public

set(money: js-money)

Change the value of this MoneySpan.

public

setElement(el: DOMNode)

Attaches this money span to the given element.

public

setRenderElement(element: DOMNode)

Set an element which this money value will render to when changed.

Public Constructors

public constructor(money: js-money, easyCurrency: src/plugins/easycurrency/main.js~EasyCurrency) source

Create a new MoneySpan instance.

Params:

NameTypeAttributeDescription
money js-money

The initial value of the element.

easyCurrency src/plugins/easycurrency/main.js~EasyCurrency

EasyCurrency

Private Members

private _easyCurrency: src/plugins/easycurrency/main.js~EasyCurrency source

private _element: DOMNode source

private _money: js-money source

Public Methods

public destroy() source

Destroys this MoneySpan.

public getElement(): DOMNode source

Retrieves the element this money span is attached to.

Return:

DOMNode

public render() source

Re-render the element.

public set(money: js-money) source

Change the value of this MoneySpan.

Params:

NameTypeAttributeDescription
money js-money

public setElement(el: DOMNode) source

Attaches this money span to the given element.

Params:

NameTypeAttributeDescription
el DOMNode

The element to attach to.

public setRenderElement(element: DOMNode) source

Set an element which this money value will render to when changed.

Params:

NameTypeAttributeDescription
element DOMNode

The element to render to.