hedera-web/js/vn/basic-lot.js

67 lines
875 B
JavaScript
Raw Normal View History

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);
}
2017-04-08 11:42:27 +00:00
,assign: function (object)
{
for (var key in object)
this._params[key] = object[key];
this.changed ();
}
2016-12-23 08:57:49 +00:00
});