Rolled back change to IgniteObject. Added ability to use a function for the class name and simplified the code.
This commit is contained in:
@ -463,7 +463,21 @@ Array.prototype.getOldPropertyValues = function (property, oldValue) {
|
||||
* The outline of an IgniteObject which contains IgniteProperties.
|
||||
*/
|
||||
class IgniteObject {
|
||||
constructor() {
|
||||
/**
|
||||
* Creates a new ignite object with an optional object to create from.
|
||||
* @param {Any} obj
|
||||
*/
|
||||
constructor(obj = null) {
|
||||
//Only do this if the object is not an ignite object already.
|
||||
if (obj && !(obj instanceof IgniteObject)) {
|
||||
Object.keys(obj).forEach(name => {
|
||||
var prop = new IgniteProperty(obj[name]);
|
||||
Object.defineProperty(this, name, {
|
||||
get: () => { return (IgniteRendering.rendering ? prop : prop.value); },
|
||||
set: (value) => { prop.value = value; }
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user