Skip to content

Commit

Permalink
Merge 5ecdc69 into 8a2d70e
Browse files Browse the repository at this point in the history
  • Loading branch information
Aditya Bist committed Jan 6, 2020
2 parents 8a2d70e + 5ecdc69 commit d74b98b
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/views/htmlcontent/src/js/components/app.component.ts
Expand Up @@ -138,6 +138,7 @@ export class AppComponent implements OnInit, AfterViewChecked {
private selectionModel = 'DragRowSelectionModel';
private slickgridPlugins = ['AutoColumnSize'];
private _rowHeight = 29;
private _resultsPaneBoundary = 2;
private _defaultNumShowingRows = 8;
private Constants = Constants;
private Utils = Utils;
Expand Down Expand Up @@ -446,10 +447,12 @@ export class AppComponent implements OnInit, AfterViewChecked {
* Toggle the messages pane
*/
private toggleMessagesPane(): void {
this._messagesPaneHeight = $('#messages').get(0).clientHeight;
this.messageActive = !this.messageActive;
this.cd.detectChanges();
if (this.messageActive) {
$('.horzBox').get(0).style.height = `${this._messagesPaneHeight}px`;
let scrollableHeight = $('.results.vertBox.scrollable').get(0).clientHeight;
$('.horzBox').get(0).style.height = `${scrollableHeight - this._resultsPaneBoundary}px`;
this.resizeGrids();
}
}

Expand Down Expand Up @@ -731,7 +734,6 @@ export class AppComponent implements OnInit, AfterViewChecked {
self.resizing = true;
self.resizeHandleTop = e.pageY;
this._messagesPaneHeight = $('#messages').get(0).clientHeight;
$('.horzBox').get(0).style.height = `${this._messagesPaneHeight}px`;
return true;
});

Expand All @@ -743,7 +745,8 @@ export class AppComponent implements OnInit, AfterViewChecked {
self.resizing = false;
// redefine the min size for the messages based on the final position
$messagePane.css('min-height', $(window).height() - (e.pageY + 22));
$('.horzBox').get(0).style.height = `${this._messagesPaneHeight}px`;
let scrollableHeight = $('.results.vertBox.scrollable').get(0).clientHeight;
$('.horzBox').get(0).style.height = `${scrollableHeight}px`;
self.cd.detectChanges();
self.resizeGrids();
});
Expand Down

0 comments on commit d74b98b

Please sign in to comment.