Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
previousWidget.hide();
}
// Show the current widget.
if (currentWidget) {
currentWidget.show();
}
// Emit the `currentChanged` signal for the tab panel.
this._currentChanged.emit({
previousIndex, previousWidget, currentIndex, currentWidget
});
// Flush the message loop on IE and Edge to prevent flicker.
if (Platform.IS_EDGE || Platform.IS_IE) {
MessageLoop.flush();
}
}
// Rehydrate the left area.
if (leftArea) {
this._leftHandler.rehydrate(leftArea);
}
// Rehydrate the right area.
if (rightArea) {
this._rightHandler.rehydrate(rightArea);
}
if (!this._isRestored) {
// Make sure all messages in the queue are finished before notifying
// any extensions that are waiting for the promise that guarantees the
// application state has been restored.
MessageLoop.flush();
this._restored.resolve(layout);
}
}
// Extract the previous and current title from the args.
let { previousTitle, currentTitle } = args;
// Hide the previous widget.
if (previousTitle) {
previousTitle.owner.hide();
}
// Show the current widget.
if (currentTitle) {
currentTitle.owner.show();
}
// Flush the message loop on IE and Edge to prevent flicker.
if (Platform.IS_EDGE || Platform.IS_IE) {
MessageLoop.flush();
}
// Schedule an emit of the layout modified signal.
MessageLoop.postMessage(this, Private.LayoutModified);
}
restoreLayout(config: DockPanel.ILayoutConfig): void {
// Reset the mode.
this._mode = 'multiple-document';
// Restore the layout.
(this.layout as DockLayout).restoreLayout(config);
// Flush the message loop on IE and Edge to prevent flicker.
if (Platform.IS_EDGE || Platform.IS_IE) {
MessageLoop.flush();
}
// Schedule an emit of the layout modified signal.
MessageLoop.postMessage(this, Private.LayoutModified);
}