Moving properties out of the way
This commit is contained in:
parent
57ccd4b0c5
commit
4af524112e
@ -6,11 +6,25 @@ var renderCounter = 0,
|
|||||||
|
|
||||||
export default class Node {
|
export default class Node {
|
||||||
constructor(textValue, offset, elements, properties) {
|
constructor(textValue, offset, elements, properties) {
|
||||||
_.extend(this, {
|
this.textValue = textValue;
|
||||||
textValue,
|
this.offset = offset;
|
||||||
offset,
|
this.elements = elements || [];
|
||||||
elements: elements || []
|
|
||||||
}, properties);
|
this.properties = properties;
|
||||||
|
|
||||||
|
// TEMPORARY
|
||||||
|
_.forOwn(this.properties, (_, key) => {
|
||||||
|
Object.defineProperty(this, key, {
|
||||||
|
get: function() {
|
||||||
|
return this.properties[key];
|
||||||
|
},
|
||||||
|
|
||||||
|
set: function(value) {
|
||||||
|
this.properties[key] = value;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
// /TEMPORARY
|
||||||
}
|
}
|
||||||
|
|
||||||
set module(mod) {
|
set module(mod) {
|
||||||
|
Loading…
Reference in New Issue
Block a user