diff --git a/packages/chili-core/src/foundation/observer.ts b/packages/chili-core/src/foundation/observer.ts index 0586d500..b1b1d2e6 100644 --- a/packages/chili-core/src/foundation/observer.ts +++ b/packages/chili-core/src/foundation/observer.ts @@ -57,11 +57,11 @@ export class Observable implements IPropertyChanged { while (proto !== null) { if (proto.hasOwnProperty(pubKey)) { Object.defineProperty(proto, privateKey, { - value: newValue, writable: true, enumerable: false, configurable: true, }); + proto[privateKey] = newValue; break; } proto = Object.getPrototypeOf(proto); diff --git a/packages/chili-ui/src/property/propertyView.ts b/packages/chili-ui/src/property/propertyView.ts index 53aa681c..7a23f5da 100644 --- a/packages/chili-ui/src/property/propertyView.ts +++ b/packages/chili-ui/src/property/propertyView.ts @@ -8,6 +8,7 @@ import { INode, IView, Node, + NodeLinkedList, ParameterShapeNode, Property, PubSub, @@ -56,10 +57,17 @@ export class PropertyView extends HTMLElement { private addModel(document: IDocument, nodes: INode[]) { if (nodes.length === 0) return; + let properties = div({ className: style.rootProperties }); - Property.getOwnProperties(Node.prototype).forEach((x) => { - appendProperty(properties, document, nodes, x); - }); + if (nodes[0] instanceof NodeLinkedList) { + Property.getProperties(Object.getPrototypeOf(nodes[0])).forEach((x) => { + appendProperty(properties, document, nodes, x); + }); + } else if (nodes[0] instanceof Node) { + Property.getOwnProperties(Node.prototype).forEach((x) => { + appendProperty(properties, document, nodes, x); + }); + } this.panel.append(properties); }