2016-09-26 09:28:47 +00:00
|
|
|
|
|
|
|
module.exports = new Class
|
2015-03-09 08:36:54 +00:00
|
|
|
({
|
|
|
|
Extends: Htk.Field
|
|
|
|
,Tag: 'htk-text'
|
|
|
|
,Properties:
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* Format that applies to the value.
|
|
|
|
**/
|
|
|
|
format:
|
|
|
|
{
|
|
|
|
type: String
|
|
|
|
,set: function (x)
|
|
|
|
{
|
|
|
|
this._format = _(x);
|
|
|
|
this.putValue (this._value);
|
|
|
|
}
|
|
|
|
,get: function ()
|
|
|
|
{
|
|
|
|
return this._format;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
,_format: null
|
|
|
|
|
|
|
|
,initialize: function (props)
|
|
|
|
{
|
2016-10-14 10:58:35 +00:00
|
|
|
this._node = document.createTextNode ('');
|
2015-11-09 08:14:33 +00:00
|
|
|
this.parent (props);
|
2015-03-09 08:36:54 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
,putValue: function (value)
|
|
|
|
{
|
|
|
|
this.node.nodeValue = Vn.Value.format (value, this._format);
|
|
|
|
}
|
|
|
|
});
|