From dd5bf3ea1a496d5e90026a1aebc81dc88c7513b1 Mon Sep 17 00:00:00 2001 From: cagataycivici Date: Thu, 21 Nov 2019 10:23:55 +0300 Subject: [PATCH] NG9 support for Dialog --- src/app/components/dialog/dialog.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/app/components/dialog/dialog.ts b/src/app/components/dialog/dialog.ts index 5a2a7df5bea..e630a00e4ca 100644 --- a/src/app/components/dialog/dialog.ts +++ b/src/app/components/dialog/dialog.ts @@ -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); } @@ -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; } } @@ -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) {