Fix bugs in attribute inheritance

This commit is contained in:
nathangray 2020-02-07 09:25:53 -07:00
parent 5e80a05cd1
commit d8345d2178
4 changed files with 4 additions and 4 deletions

View File

@ -126,7 +126,7 @@ var ClassWithAttributes = /** @class */ (function () {
class_prototype = Object.getPrototypeOf(class_prototype);
} while (class_prototype !== ClassWithAttributes && n < 50);
for (var i = class_tree.length - 1; i >= 0; i--) {
attributes = ClassWithAttributes.extendAttributes(attributes, class_tree[i]._attributes);
attributes = ClassWithAttributes.extendAttributes(class_tree[i]._attributes, attributes);
}
return attributes;
};

View File

@ -168,7 +168,7 @@ export class ClassWithAttributes
for(let i = class_tree.length - 1; i >= 0; i--)
{
attributes = ClassWithAttributes.extendAttributes(attributes,class_tree[i]._attributes);
attributes = ClassWithAttributes.extendAttributes(class_tree[i]._attributes,attributes);
}
return attributes;
}

View File

@ -451,7 +451,7 @@ var et2_widget = /** @class */ (function (_super) {
// do NOT overwrite already evaluated readonly attribute
}
else {
var attrs = et2_attribute_registry[Object.getPrototypeOf(_proto).constructor.name] || {};
var attrs = et2_attribute_registry[_proto.constructor.name] || {};
if (mgr != null && typeof attrs[attrName] != "undefined") {
var attr = attrs[attrName];
// If the attribute is marked as boolean, parse the

View File

@ -578,7 +578,7 @@ Comment this out (for now)
} else if (attrName == "readonly" && typeof _target[attrName] != "undefined") {
// do NOT overwrite already evaluated readonly attribute
} else {
let attrs = et2_attribute_registry[Object.getPrototypeOf(_proto).constructor.name] || {};
let attrs = et2_attribute_registry[_proto.constructor.name] || {};
if (mgr != null && typeof attrs[attrName] != "undefined") {
var attr = attrs[attrName];