Skip to content

Commit

Permalink
NG9 support for Dialog
Browse files Browse the repository at this point in the history
  • Loading branch information
cagataycivici committed Nov 21, 2019
1 parent eb82bbc commit dd5bf3e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/app/components/dialog/dialog.ts
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ export class Dialog implements OnDestroy {
this.left = '0px';
this.width = '100vw';
this.height = '100vh';
let diffHeight = parseFloat(this.container.style.top);
let diffHeight = 0;
if(this.headerViewChild && this.headerViewChild.nativeElement) {
diffHeight += DomHandler.getOuterHeight(this.headerViewChild.nativeElement);
}
Expand Down Expand Up @@ -430,6 +430,9 @@ export class Dialog implements OnDestroy {

this.lastPageX = event.pageX;
this.lastPageY = event.pageY;

this.container.style.left = this.left;
this.container.style.top = this.top;
}
}

Expand Down Expand Up @@ -466,6 +469,7 @@ export class Dialog implements OnDestroy {

if ((!minWidth || newWidth > parseInt(minWidth)) && (offset.left + newWidth) < viewport.width) {
this.width = newWidth + 'px';
this.container.style.width = this.width;
}

if ((!minHeight || newHeight > parseInt(minHeight)) && (offset.top + newHeight) < viewport.height) {
Expand Down

0 comments on commit dd5bf3e

Please sign in to comment.