0
1
Fork 0
hedera-web-mindshore/js/htk/label/index.js

35 lines
454 B
JavaScript
Raw Permalink Normal View History

2016-09-26 09:28:47 +00:00
module.exports = new Class
({
Extends: Htk.Field
,Tag: 'htk-label'
,Properties:
{
/**
* Format that applies to the value.
2022-05-26 06:08:31 +00:00
*/
format:
{
type: String
2022-11-16 01:46:44 +00:00
,set(x) {
this._format = _(x);
2022-05-26 06:08:31 +00:00
this.putValue(this._value);
}
2022-11-16 01:46:44 +00:00
,get() {
return this._format;
}
}
}
,_format: null
2022-11-16 01:46:44 +00:00
,render() {
2022-05-26 06:08:31 +00:00
this.createRoot('label');
}
2022-11-16 01:46:44 +00:00
,putValue(value) {
2022-05-26 06:08:31 +00:00
Vn.Node.setText(this.node,
Vn.Value.format(value, this._format));
}
});