Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
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);
}
addWidget(widget: Widget, options: DockPanel.IAddOptions = {}): void {
// Add the widget to the layout.
if (this._mode === 'single-document') {
(this.layout as DockLayout).addWidget(widget);
} else {
(this.layout as DockLayout).addWidget(widget, options);
}
// Schedule an emit of the layout modified signal.
MessageLoop.postMessage(this, Private.LayoutModified);
}
private _evtMouseUp(event: MouseEvent): void {
// Do nothing if the left mouse button is not released.
if (event.button !== 0) {
return;
}
// Stop the event when releasing a handle.
event.preventDefault();
event.stopPropagation();
// Finalize the mouse release.
this._releaseMouse();
// Schedule an emit of the layout modified signal.
MessageLoop.postMessage(this, Private.LayoutModified);
}
protected onChildRemoved(msg: Widget.ChildMessage): void {
// Ignore the generated tab bars.
if (Private.isGeneratedTabBarProperty.get(msg.child)) {
return;
}
// Remove the widget class from the child.
msg.child.removeClass('p-DockPanel-widget');
// Schedule an emit of the layout modified signal.
MessageLoop.postMessage(this, Private.LayoutModified);
}
private _onTabMoved(): void {
MessageLoop.postMessage(this, Private.LayoutModified);
}