From d1cd3ea3aa19385cea98891da0a60bd264ba454a Mon Sep 17 00:00:00 2001 From: martinRenou Date: Mon, 18 Oct 2021 16:29:12 +0200 Subject: [PATCH] Add layout, style and shown events --- packages/base/src/widget.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/packages/base/src/widget.ts b/packages/base/src/widget.ts index 981264fc31..1bee253110 100644 --- a/packages/base/src/widget.ts +++ b/packages/base/src/widget.ts @@ -937,6 +937,7 @@ export class DOMWidgetView extends WidgetView { this.luminoWidget, Widget.ResizeMessage.UnknownSize ); + this.trigger('layout-changed'); return view; }); }) @@ -961,6 +962,7 @@ export class DOMWidgetView extends WidgetView { // Trigger the displayed event of the child view. return this.displayed.then(() => { view.trigger('displayed'); + this.trigger('style-changed'); // Unlike for the layout attribute, style changes don't // trigger Lumino resize messages. return view; @@ -1083,6 +1085,9 @@ export class DOMWidgetView extends WidgetView { case 'after-attach': this.trigger('displayed'); break; + case 'show': + this.trigger('shown'); + break; } }