Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions src/app/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -439,19 +439,20 @@ function renderGantt(){
const tip=`${n.title} · ${SIZE_NAMES[sz]} · ${fmtD(dayIso(e))}${late?' (late)':''}${hasKids?` · ${donePct}% done`:""}`+(ctx
?` — ${ctx.proj}${ctx.parent?" › "+ctx.parent:""} · ${({high:"high",med:"medium",low:"low"})[n.priority||"med"]} priority · ${person(n.owner).name}`
:"");
const startTip=`Start · ${fmtD(dayIso(s))}`, endTip=`End · ${fmtD(dayIso(e))}`;
return `<div class="grow"><div class="gtrack" data-full="${tip}" style="height:${h+4}px">
<div class="gbar gsz-${sz} ${done?'gdone':''} ${isSub?'gsub':''}" data-tid="${n.id}" onpointerdown="barDown(event,${n.id},'move')"
oncontextmenu="barContext(event,${n.id},this.getBoundingClientRect())"
data-full="${tip}"
style="height:${h}px;left:${gx(tcs)}%;width:${gx(tce)-gx(tcs)}%;${isSub
?`background:#fff;border:2px solid ${col};color:${col}`
:fillBg}">
<i class="ear el" onpointerdown="barDown(event,${n.id},'l')"></i>
<i class="ear el" data-full="${startTip}" onpointerdown="barDown(event,${n.id},'l')"></i>
<span class="gava">${av(n.owner,"xs")}</span>
<span class="ttl">${n.title}</span>
<button class="gdot ${done?'on':''}" onpointerdown="event.stopPropagation()"
onclick="event.stopPropagation();ding(4);toggleDone(${n.id})" aria-label="${done?'Undo done':'Mark done'}">${done?'✓':''}</button>
<i class="ear er" onpointerdown="barDown(event,${n.id},'r')"></i>
<i class="ear er" data-full="${endTip}" onpointerdown="barDown(event,${n.id},'r')"></i>
</div>${extra?`<div class="gexpw" style="left:calc(${gx(tce)}% + 5px)">${extra}</div>`:""}
</div></div>`;
};
Expand Down Expand Up @@ -1632,7 +1633,7 @@ function hoverOn(target){
const key=host.dataset.tid||host.dataset.full;
if(key!==tipKey){ // moved onto a new bar → arm the reveal delay
clearTimeout(tipTimer); tipKey=key; tipEl=host; TIP.style.display="none";
tipTimer=setTimeout(revealTip,600); return;
tipTimer=setTimeout(revealTip,host.classList.contains("ear")?250:600); return;
}
tipEl=host; // same bar (may be a fresh node after a render)
if(TIP.style.display==="block") placeTip(); // already shown → follow the cursor
Expand Down
Loading