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(); }