diff --git a/app/static/project.js b/app/static/project.js
index 3a5f4d0..ec10e96 100644
--- a/app/static/project.js
+++ b/app/static/project.js
@@ -3637,6 +3637,8 @@
currentView = view;
try { localStorage.setItem(VIEW_KEY, view); } catch (_) {}
if (moveViewHighlight) moveViewHighlight(true);
+ // 대시보드 탭에 새로 들어올 때만 0부터 차오르는 애니메이션(그 뒤 다시 그리기는 바뀐 값만 움직인다).
+ if (view === "dashboard") Object.keys(dashPrev).forEach(function (k) { delete dashPrev[k]; });
renderView(view);
}
tabs.addEventListener("click", function (e) {
@@ -6207,8 +6209,18 @@
// 로 클라이언트에서 즉시 집계 — 서버 재조회 없음. 스코프 토글(이
// 프로젝트/전체 프로젝트)도 다른 뷰와 똑같이 따른다.
// ════════════════════════════════════════════════════════════
- function animateCount(el, target, duration) {
- const start = 0;
+ // 다시 그릴 때 깜박임 방지(2026-10-13) — 숫자·막대·도넛의 마지막 값을 기억해 두고 새 요소는 그 값에서
+ // 시작한다(값이 그대로면 움직임 없음, 바뀐 것만 부드럽게). 대시보드 탭에 들어올 때만 비워 0부터 그린다.
+ const dashPrev = {};
+ function dashFrom(key, value) {
+ const prev = Object.prototype.hasOwnProperty.call(dashPrev, key) ? dashPrev[key] : 0;
+ dashPrev[key] = value;
+ return prev;
+ }
+ function animateCount(el, target, duration, from) {
+ const start = from || 0;
+ if (start === target) { el.textContent = String(target); return; }
+ el.textContent = String(start);
const t0 = performance.now();
function step(now) {
const p = Math.min(1, (now - t0) / duration);
@@ -6219,6 +6231,12 @@
}
requestAnimationFrame(step);
}
+ // 막대 채움 — from(이전 값, %)에서 시작해 다음 프레임에 to 로(CSS transition). 같으면 바로 그 값.
+ function dashGrow(fill, prop, from, to) {
+ fill.style[prop] = from + "%";
+ if (from === to) return;
+ requestAnimationFrame(function () { requestAnimationFrame(function () { fill.style[prop] = to + "%"; }); });
+ }
function dashStatTile(label, value) {
const tile = document.createElement("div");
tile.className = "pj-dash-stat";
@@ -6227,7 +6245,7 @@
'
0
';
tile.querySelector(".pj-dash-stat-label").textContent = label;
const valEl = tile.querySelector(".pj-dash-stat-value");
- animateCount(valEl, value, 700);
+ animateCount(valEl, value, 700, dashFrom("stat:" + label, value));
return tile;
}
// 프로젝트별 완료 막대 — 줄마다 색 점·프로젝트 이름(누르면 그 프로젝트)·막대(채움 = 완료율)·완료/전체(%).
@@ -6258,7 +6276,7 @@
row.querySelector(".pj-dash-projval").textContent = p.done + "/" + p.total + " · " + pct + "%";
const fill = row.querySelector(".pj-dash-projtrack i");
fill.dataset.pct = String(pct);
- requestAnimationFrame(function () { requestAnimationFrame(function () { fill.style.width = pct + "%"; }); });
+ dashGrow(fill, "width", dashFrom("proj:" + p.id, pct), pct);
wrap.appendChild(row);
});
return wrap;
@@ -6326,11 +6344,14 @@
let svg = '