MoneySpan
Represents an element which renders a monetary value.
Constructor Summary
| Public Constructor | ||
| public |
constructor(money: js-money, easyCurrency: src/easycurrency/main.js~EasyCurrency) Create a new MoneySpan instance. |
|
Member Summary
| Private Members | ||
| private |
_easyCurrency: src/easycurrency/main.js~EasyCurrency |
|
| private |
_element: DOMNode |
|
| private |
_money: js-money |
|
Method Summary
| Public Methods | ||
| public |
destroy() 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/easycurrency/main.js~EasyCurrency) source
Create a new MoneySpan instance.
Params:
| Name | Type | Attribute | Description |
| money | js-money | The initial value of the element. |
|
| easyCurrency | src/easycurrency/main.js~EasyCurrency | EasyCurrency |
Private Members
private _easyCurrency: src/easycurrency/main.js~EasyCurrency source
private _element: DOMNode source
private _money: js-money source
Public Methods
public getElement(): DOMNode source
Retrieves the element this money span is attached to.
Return:
| DOMNode |
public set(money: js-money) source
Change the value of this MoneySpan.
Params:
| Name | Type | Attribute | Description |
| money | js-money |
public setElement(el: DOMNode) source
Attaches this money span to the given element.
Params:
| Name | Type | Attribute | Description |
| 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:
| Name | Type | Attribute | Description |
| element | DOMNode | The element to render to. |