hedera-web/js/htk/text/index.js

34 lines
457 B
JavaScript

module.exports = new Class
({
Extends: Htk.Field
,Tag: 'htk-text'
,Properties:
{
/**
* Format that applies to the value.
*/
format:
{
type: String
,set(x) {
this._format = _(x);
this.putValue(this._value);
}
,get() {
return this._format;
}
}
}
,_format: null
,render() {
this._node = this.createTextNode('');
}
,putValue(value) {
this._node.nodeValue = Vn.Value.format(value, this._format);
}
});