Et2Dialog changes

- Set template's DOM ID so CSS can style it

This is the best way to set [minimum] dimensions, though you can set width & height on the Et2Dialog.
This commit is contained in:
nathan 2022-03-21 08:43:53 -06:00
parent d7400503ac
commit e9a381da69
2 changed files with 6 additions and 6 deletions

View File

@ -418,7 +418,7 @@ export class Et2Dialog extends Et2Widget(ScopedElementsMixin(SlotMixin(LionDialo
} }
} }
// set template-name as id, to allow to style dialogs // set template-name as id, to allow to style dialogs
//this.div.children().attr('id', new_template_name.replace(/^(.*\/)?([^/]+)(\.xet)?$/, '$2').replace(/\./g, '-')); this._template_widget.DOMContainer.setAttribute('id', this.__template.replace(/^(.*\/)?([^/]+)(\.xet)?$/, '$2').replace(/\./g, '-'));
} }

View File

@ -48,6 +48,7 @@ export class Et2DialogOverlay extends SlotMixin(LitElement)
} }
#overlay-content-node-wrapper { #overlay-content-node-wrapper {
flex: 1 1 auto; flex: 1 1 auto;
padding: 10px;
} }
.overlay__heading > .overlay__close-button { .overlay__heading > .overlay__close-button {
@ -111,9 +112,9 @@ export class Et2DialogOverlay extends SlotMixin(LitElement)
async getUpdateComplete() async getUpdateComplete()
{ {
let result = await super.getUpdateComplete(); let result = await super.getUpdateComplete();
if(this._contentNode && this._contentNode.getUpdateComplete) if(this._contentNode && this._contentNode instanceof LitElement)
{ {
await this._contentNode.getUpdateComplete(); await (<LitElement>this._contentNode).updateComplete;
} }
return result; return result;
} }
@ -125,13 +126,12 @@ export class Et2DialogOverlay extends SlotMixin(LitElement)
this.updateComplete this.updateComplete
.then(async() => .then(async() =>
{ {
if(this._contentNode && this._contentNode.getUpdateComplete) if(this._contentNode && this._contentNode instanceof LitElement)
{ {
// Re-do render to get proper images // Re-do render to get proper images
this._contentNode.requestUpdate(); this._contentNode.requestUpdate();
await this._contentNode.getUpdateComplete(); await this._contentNode.updateComplete;
} }
}); });
} }