fix(core): update

This commit is contained in:
Philipp Kunz 2020-06-01 15:56:32 +00:00
parent 8d628d3285
commit c222a66ead

View File

@ -73,7 +73,6 @@ export class WccDashboard extends LitElement {
this.setWarning(null);
return html`${anonItem.demo()}`;
} else {
this.selectedItem = WccDefaultElement as any;
this.updateSlot();
}
})()}
@ -81,12 +80,22 @@ export class WccDashboard extends LitElement {
`;
}
private currentlyUpdating: boolean = false;
public async updateSlot() {
if (this.currentlyUpdating) {
return;
}
this.currentlyUpdating = true;
!this.selectedItem ? this.selectedItem = WccDefaultElement as any : null;
const localSelectedItem = this.selectedItem;
this.selectedItem = null;
console.log('updateSlot');
const domtools = await plugins.deesDomtools.DomTools.setupDomTools();
domtools.setVirtualViewport(this.selectedViewport);
await plugins.smartdelay.delayFor(0);
super.performUpdate();
await super.performUpdate();
this.selectedItem = localSelectedItem;
await super.performUpdate();
this.currentlyUpdating = false;
}
public setWarning(warningTextArg: string) {