fix(core): update

This commit is contained in:
Philipp Kunz 2021-11-26 19:16:09 +01:00
parent 19081caacd
commit 2efa465930

View File

@ -130,13 +130,14 @@ export class WccProperties extends LitElement {
.warning {
position: absolute;
background: #800000;
background: #222;
color: #CCC;
top: 0px;
bottom: 0px;
left: 0px;
right: 0px;
right: 520px;
text-align: center;
padding: 20px;
padding: 35px;
font-size: 25px;
}
</style>
@ -256,6 +257,7 @@ export class WccProperties extends LitElement {
console.log(`Got Dees-Element for property evaluation.`);
const anonItem: any = this.selectedItem;
if (!anonItem) {
this.warning = 'no element selected';
return;
}
console.log(anonItem.elementProperties);
@ -268,12 +270,15 @@ export class WccProperties extends LitElement {
}
}
if (!firstFoundInstantiatedElement) {
this.warning = `no first instantiated element found for >>${anonItem.name}<<`;
return;
}
const classProperties: Map<string, any> = anonItem.elementProperties;
if (!classProperties) {
this.warning = `selected element >>${anonItem.name}<< does not expose element properties`;
return;
}
this.warning = null;
const propertyArray: TemplateResult[] = [];
for (const key of classProperties.keys()) {
if (key === 'goBright' || key === 'domtools') {
@ -337,7 +342,8 @@ export class WccProperties extends LitElement {
}
this.propertyContent = propertyArray;
} else {
console.log(`Cannot extract properties of ${(this.selectedItem as any)?.name}`)
console.log(`Cannot extract properties of ${(this.selectedItem as any)?.name}`);
this.warning = `You selected a page.`;
return null;
}
}