forked from verdnatura/hedera-web
59 lines
758 B
JavaScript
59 lines
758 B
JavaScript
|
|
var Object = require ('./object');
|
|
var Lot = require ('./lot');
|
|
|
|
module.exports = new Class
|
|
({
|
|
Extends: Object
|
|
,Implements: Lot
|
|
,Tag: 'vn-basic-set'
|
|
,Properties:
|
|
{
|
|
params:
|
|
{
|
|
type: Object
|
|
,set: function (x)
|
|
{
|
|
this._params = x;
|
|
this.changed ();
|
|
}
|
|
,get: function ()
|
|
{
|
|
return this._params;
|
|
}
|
|
}
|
|
}
|
|
|
|
,initialize: function (props)
|
|
{
|
|
this._params = {};
|
|
this.parent (props);
|
|
}
|
|
|
|
,get: function (paramName)
|
|
{
|
|
return this._params[paramName];
|
|
}
|
|
|
|
,set: function (paramName, value)
|
|
{
|
|
this._params[paramName] = value;
|
|
this.changed ();
|
|
}
|
|
|
|
/**
|
|
* Resets all values.
|
|
*/
|
|
,reset: function ()
|
|
{
|
|
this._params = {};
|
|
this.changed ();
|
|
}
|
|
|
|
,keys: function ()
|
|
{
|
|
return Object.keys (this._params);
|
|
}
|
|
});
|
|
|