From b683f4a129d767d206b6c47ff1ea3ef043926224 Mon Sep 17 00:00:00 2001 From: ViVi Date: Thu, 10 Oct 2024 11:01:18 +0900 Subject: [PATCH 1/5] =?UTF-8?q?=E7=99=BA=E8=A8=80=E7=B7=A8=E9=9B=86?= =?UTF-8?q?=E3=82=A6=E3=82=A3=E3=83=B3=E3=83=89=E3=82=A6=E3=81=8C=E6=A5=B5?= =?UTF-8?q?=E7=AB=AF=E3=81=AB=E5=A4=A7=E3=81=8D=E3=81=8F=E3=81=AA=E3=82=8A?= =?UTF-8?q?=E3=81=99=E3=81=8E=E3=81=AA=E3=81=84=E3=82=88=E3=81=86=E3=81=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/css/chat-layout-pc.css | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/css/chat-layout-pc.css b/lib/css/chat-layout-pc.css index e2ab8d59..b7d66ad3 100644 --- a/lib/css/chat-layout-pc.css +++ b/lib/css/chat-layout-pc.css @@ -936,6 +936,7 @@ body { left: 5em; right: auto; bottom: 8em; + max-height: 40vh; } #rewrite-form textarea { width: 40vw; From 67065cada9222dbc5bc79ced63d95e13d20263cb Mon Sep 17 00:00:00 2001 From: ViVi Date: Thu, 10 Oct 2024 15:57:11 +0900 Subject: [PATCH 2/5] =?UTF-8?q?=E7=99=BA=E8=A8=80=E7=B7=A8=E9=9B=86?= =?UTF-8?q?=E3=83=86=E3=82=AD=E3=82=B9=E3=83=88=E3=82=A8=E3=83=AA=E3=82=A2?= =?UTF-8?q?=E3=81=AE=E8=87=AA=E5=8B=95=E3=82=B5=E3=82=A4=E3=82=BA=E8=AA=BF?= =?UTF-8?q?=E6=95=B4=E3=82=92=E3=82=84=E3=82=81=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 発言編集ウィンドウの大きさを制限するにあたって、テキストエリア部分をスクロールさせるかたちで吸収したいので --- lib/css/chat-layout-pc.css | 12 ++++++++++++ lib/html/room.html | 2 +- lib/js/ui.js | 1 - 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/lib/css/chat-layout-pc.css b/lib/css/chat-layout-pc.css index b7d66ad3..557292a7 100644 --- a/lib/css/chat-layout-pc.css +++ b/lib/css/chat-layout-pc.css @@ -937,6 +937,18 @@ body { right: auto; bottom: 8em; max-height: 40vh; + min-height: 12rem; + + > .comm-area { + height: calc(100% - (0.5rem * 2) - (3rem + ((2rem * 2) + 0.1rem))); + margin-top: 0.5rem; + margin-bottom: 0.5rem; + + textarea { + height: 100%; + overflow-y: auto; + } + } } #rewrite-form textarea { width: 40vw; diff --git a/lib/html/room.html b/lib/html/room.html index 6f7d6719..64af440e 100644 --- a/lib/html/room.html +++ b/lib/html/room.html @@ -246,7 +246,7 @@

発言名変更

発言編集

- +
diff --git a/lib/js/ui.js b/lib/js/ui.js index 7d9d8dc6..2c12ad37 100644 --- a/lib/js/ui.js +++ b/lib/js/ui.js @@ -449,7 +449,6 @@ function rewriteOpen(num){ .replace(/</g, '<') .replace(/>/g, '>') obj.value = setValue; - autosizeUpdate(obj); obj.focus(); } function rewriteNameOpen(num,name){ From 08105a4ef6bdd9a08f02b0cf82cc2f10e368bfc8 Mon Sep 17 00:00:00 2001 From: ViVi Date: Thu, 10 Oct 2024 11:21:49 +0900 Subject: [PATCH 3/5] =?UTF-8?q?=E7=99=BA=E8=A8=80=E7=B7=A8=E9=9B=86?= =?UTF-8?q?=E3=82=A6=E3=82=A3=E3=83=B3=E3=83=89=E3=82=A6=E3=81=AE=E6=A8=AA?= =?UTF-8?q?=E5=B9=85=E3=82=92=E5=A4=A7=E3=81=8D=E3=81=8F=E3=81=97=E3=81=9F?= =?UTF-8?q?=E3=81=A8=E3=81=8D=E3=81=AB=E3=83=86=E3=82=AD=E3=82=B9=E3=83=88?= =?UTF-8?q?=E3=82=A8=E3=83=AA=E3=82=A2=E3=81=8C=E4=BC=B8=E9=95=B7=E3=81=99?= =?UTF-8?q?=E3=82=8B=E3=82=88=E3=81=86=E3=81=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/css/chat-layout-pc.css | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lib/css/chat-layout-pc.css b/lib/css/chat-layout-pc.css index 557292a7..54af80dd 100644 --- a/lib/css/chat-layout-pc.css +++ b/lib/css/chat-layout-pc.css @@ -938,6 +938,7 @@ body { bottom: 8em; max-height: 40vh; min-height: 12rem; + min-width: 42vw; > .comm-area { height: calc(100% - (0.5rem * 2) - (3rem + ((2rem * 2) + 0.1rem))); @@ -951,9 +952,6 @@ body { } } #rewrite-form textarea { - width: 40vw; - max-width: 90vw; - max-height: 80vh; margin-top: .1rem; } #rewrite-name-form { From 1040cd59497f50f98dd83d3891f5d7f1d34cf96d Mon Sep 17 00:00:00 2001 From: ViVi Date: Thu, 10 Oct 2024 11:23:25 +0900 Subject: [PATCH 4/5] =?UTF-8?q?=E7=99=BA=E8=A8=80=E7=B7=A8=E9=9B=86?= =?UTF-8?q?=E3=83=86=E3=82=AD=E3=82=B9=E3=83=88=E3=82=A8=E3=83=AA=E3=82=A2?= =?UTF-8?q?=E3=81=A8=E9=80=81=E4=BF=A1=E3=83=9C=E3=82=BF=E3=83=B3=E3=81=8C?= =?UTF-8?q?=201px=20=E3=81=8F=E3=82=89=E3=81=84=E3=81=9A=E3=82=8C=E3=81=A6?= =?UTF-8?q?=E8=A1=A8=E7=A4=BA=E3=81=95=E3=82=8C=E3=82=8B=E3=81=AE=E3=82=92?= =?UTF-8?q?=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/css/chat-layout-pc.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/css/chat-layout-pc.css b/lib/css/chat-layout-pc.css index 54af80dd..ca960477 100644 --- a/lib/css/chat-layout-pc.css +++ b/lib/css/chat-layout-pc.css @@ -952,7 +952,7 @@ body { } } #rewrite-form textarea { - margin-top: .1rem; + margin: 0; } #rewrite-name-form { top: auto; From 09584e555f589ba680b5e8c21133528c18abd820 Mon Sep 17 00:00:00 2001 From: ViVi Date: Thu, 10 Oct 2024 15:58:04 +0900 Subject: [PATCH 5/5] =?UTF-8?q?=E7=99=BA=E8=A8=80=E7=B7=A8=E9=9B=86?= =?UTF-8?q?=E3=82=A6=E3=82=A3=E3=83=B3=E3=83=89=E3=82=A6=E3=82=92=E3=80=81?= =?UTF-8?q?=E3=81=A7=E3=81=8D=E3=82=8B=E3=81=8B=E3=81=8E=E3=82=8A=E7=B7=A8?= =?UTF-8?q?=E9=9B=86=E5=AF=BE=E8=B1=A1=E3=81=AE=E7=99=BA=E8=A8=80=E3=81=AE?= =?UTF-8?q?=E8=BF=91=E3=81=8F=E3=81=A7=E9=96=8B=E3=81=8B=E3=82=8C=E3=82=8B?= =?UTF-8?q?=E3=82=88=E3=81=86=E3=81=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/js/ui.js | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/lib/js/ui.js b/lib/js/ui.js index 2c12ad37..985c7365 100644 --- a/lib/js/ui.js +++ b/lib/js/ui.js @@ -450,6 +450,32 @@ function rewriteOpen(num){ .replace(/>/g, '>') obj.value = setValue; obj.focus(); + + { + const sourceMessageNode = document.getElementById(`line-${num}-comm`); + + if (sourceMessageNode != null) { + const rewriteForm = document.getElementById('rewrite-form'); + const tabGroupNode = sourceMessageNode.closest('.tab-group'); + const isMain = tabGroupNode.classList.contains('main'); + + const rect = sourceMessageNode.getBoundingClientRect(); + + const x = isMain ? rect.left : rect.right - rewriteForm.getBoundingClientRect().width; + const y = Math.min(rect.bottom + 15, tabGroupNode.getBoundingClientRect().bottom); + + const m = rewriteForm.style.inset.match(/^[\d.]+px\s+(\S+)\s+(\S+)\s+[\d.]+px$/); + + if (m != null) { + rewriteForm.style.inset = `${y}px ${m[1]} ${m[2]} ${x}px`; + } else { + rewriteForm.style.left = `${x}px`; + rewriteForm.style.right = 'auto'; + rewriteForm.style.top = `${y}px`; + rewriteForm.style.bottom = 'auto'; + } + } + } } function rewriteNameOpen(num,name){ boxOpen('rewrite-name-form');