Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit60ce4d7

Browse files
committed
Delay a mimedocument from being ready until the context is ready.
1 parent1107f69 commit60ce4d7

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

‎packages/docregistry/src/default.ts‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -417,15 +417,17 @@ abstract class ABCWidgetFactory<T extends IDocumentWidget, U extends DocumentReg
417417
export
418418
classDocumentWidget<TextendsWidget=Widget,UextendsDocumentRegistry.IModel=DocumentRegistry.IModel>extendsMainAreaWidget<T>implementsIDocumentWidget<T,U>{
419419
constructor(options:DocumentWidget.IOptions<T,U>){
420+
421+
// Include the context ready promise in the widget ready promise
422+
options.ready=Promise.all([options.ready,options.context.ready]).then(()=>{return;});
420423
super(options);
424+
421425
this.context=options.context;
422426

423427
this.context.pathChanged.connect(this._onPathChanged,this);
424428
this._onPathChanged();
425429
}
426430

427-
// TODO: redefine the populated/isPopulated to *also* wait for the context load/rendering
428-
429431
/**
430432
* Handle a path change.
431433
*/

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp