From 5339ee4538eff6d3f01e5213a553b0384e5bb040 Mon Sep 17 00:00:00 2001 From: king Date: Tue, 1 Sep 2026 17:20:44 +0900 Subject: [PATCH] =?UTF-8?q?fix(cupang):=20=EC=A0=91=ED=9E=8C=20=EB=A0=88?= =?UTF-8?q?=EC=9D=B4=EC=95=84=EC=9B=83=EC=97=90=EC=84=9C=20=EC=8A=A4?= =?UTF-8?q?=ED=81=AC=EB=A1=A4=20=EC=98=81=EC=97=AD=20=EB=86=92=EC=9D=B4?= =?UTF-8?q?=EA=B0=80=20160px=20=EB=A1=9C=20=EC=9E=98=EB=A6=AC=EB=8D=98=20?= =?UTF-8?q?=EB=AC=B8=EC=A0=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 3열이 접혀 ③ 카드가 둘째 줄로 내려가면 (창높이 − 요소top) 이 음수가 되어 최소값 160px 로 고정됐다. 260px 이하면 창 높이의 60% 를 쓰도록 바꾸고, 페이지 스크롤 시에도 높이를 다시 계산한다. Co-Authored-By: Claude Opus 5 --- app/modules/cupang/templates/cupang/box_calc.html | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/app/modules/cupang/templates/cupang/box_calc.html b/app/modules/cupang/templates/cupang/box_calc.html index b783e80..298e380 100644 --- a/app/modules/cupang/templates/cupang/box_calc.html +++ b/app/modules/cupang/templates/cupang/box_calc.html @@ -1078,7 +1078,10 @@ panes.forEach(function (el) { if (!el) return; var top = el.getBoundingClientRect().top; - var h = Math.max(160, window.innerHeight - top - 24); + var avail = window.innerHeight - top - 24; + // 화면 아래로 내려가 있는(3열이 접힌) 영역은 창 높이의 60% 를 쓴다. + // 그대로 두면 음수가 되어 아주 작은 높이로 잘린다. + var h = avail > 260 ? avail : Math.round(window.innerHeight * 0.6); // !important 로 박아 넣는다 — 다른 규칙에 밀리지 않게 el.style.setProperty("max-height", h + "px", "important"); el.style.setProperty("overflow-y", "auto", "important"); @@ -1088,6 +1091,8 @@ } window.addEventListener("resize", fitScrollAreas); + var pageScroller = document.querySelector(".erp-page"); + if (pageScroller) pageScroller.addEventListener("scroll", fitScrollAreas, { passive: true }); function render() { renderSummary(); renderDist(); fitScrollAreas(); }