From 94835583722bf00ef182cadb4b8fd5d3949f2764 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=93=E3=81=B4=E3=81=AA=E3=81=9F=E3=81=BF=E3=81=BD?= Date: Mon, 13 Nov 2017 08:53:38 +0900 Subject: [PATCH] :v: --- src/web/app/desktop/tags/messaging/room-window.tag | 8 ++------ src/web/app/desktop/tags/window.tag | 13 +++++++------ 2 files changed, 9 insertions(+), 12 deletions(-) diff --git a/src/web/app/desktop/tags/messaging/room-window.tag b/src/web/app/desktop/tags/messaging/room-window.tag index 4d4f5c626d..dca0172be3 100644 --- a/src/web/app/desktop/tags/messaging/room-window.tag +++ b/src/web/app/desktop/tags/messaging/room-window.tag @@ -1,5 +1,5 @@ - + メッセージ: { parent.user.name } @@ -23,11 +23,7 @@ this.user = this.opts.user; - this.popout = { - url: `${CONFIG.url}/i/messaging/${this.user.username}`, - width: 420, - height: 540 - }; + this.popout = `${CONFIG.url}/i/messaging/${this.user.username}`; this.on('mount', () => { this.refs.window.on('closed', () => { diff --git a/src/web/app/desktop/tags/window.tag b/src/web/app/desktop/tags/window.tag index cc8dc4c1a4..f0e1a3fdd1 100644 --- a/src/web/app/desktop/tags/window.tag +++ b/src/web/app/desktop/tags/window.tag @@ -5,7 +5,7 @@

- +
@@ -194,8 +194,7 @@ this.isModal = this.opts.isModal != null ? this.opts.isModal : false; this.canClose = this.opts.canClose != null ? this.opts.canClose : true; - this.popoutOption = this.opts.popoutOption; - console.log(this.popoutOption); + this.popoutUrl = this.opts.popout; this.isFlexible = this.opts.height == null; this.canResize = !this.isFlexible; @@ -265,12 +264,14 @@ this.popout = () => { const position = this.refs.main.getBoundingClientRect(); + const width = parseInt(getComputedStyle(this.refs.main, '').width, 10); + const left = parseInt(getComputedStyle(this.refs.main, '').left, 10); const x = window.screenX + position.left; const y = window.screenY + position.top; - window.open(this.popoutOption.url, - this.popoutOption.url, - `height=${this.popoutOption.height},width=${this.popoutOption.width},left=${x},top=${y}`); + window.open(this.popoutUrl, + this.popoutUrl, + `height=${height},width=${width},left=${x},top=${y}`); this.close(); };