2016-12-23 08:57:49 +00:00
|
|
|
|
|
|
|
var Object = require ('./object');
|
2017-04-05 14:06:07 +00:00
|
|
|
var Lot = require ('./lot');
|
2016-12-23 08:57:49 +00:00
|
|
|
|
|
|
|
module.exports = new Class
|
|
|
|
({
|
|
|
|
Extends: Object
|
2017-04-05 14:06:07 +00:00
|
|
|
,Implements: Lot
|
2016-12-23 08:57:49 +00:00
|
|
|
,Tag: 'vn-basic-set'
|
2017-03-30 11:44:53 +00:00
|
|
|
,Properties:
|
|
|
|
{
|
|
|
|
params:
|
|
|
|
{
|
|
|
|
type: Object
|
|
|
|
,set: function (x)
|
|
|
|
{
|
|
|
|
this._params = x;
|
|
|
|
this.changed ();
|
|
|
|
}
|
|
|
|
,get: function ()
|
|
|
|
{
|
|
|
|
return this._params;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2016-12-23 08:57:49 +00:00
|
|
|
|
|
|
|
,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 ();
|
|
|
|
}
|
2017-03-30 11:44:53 +00:00
|
|
|
|
|
|
|
,keys: function ()
|
|
|
|
{
|
|
|
|
return Object.keys (this._params);
|
|
|
|
}
|
2016-12-23 08:57:49 +00:00
|
|
|
});
|
|
|
|
|