Tag-Ansicht: pausierte Zeiten bleiben als Verlauf stehen (verschwinden nicht mehr)
live-client loggt Pausen-Spannen (__pauseSpans: {s,e}), live.php reicht sie durch,
renderLiveSummary zeichnet jede als bleibendes halbhohes Segment im Tag-Balken
(offene/laufende Pause blinkt). Fallback fuer Sim-Pause via phase bleibt.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
+19
-4
@@ -2282,12 +2282,27 @@ async function renderLiveSummary() {
|
||||
+ 'white-space:nowrap;overflow:hidden;text-overflow:ellipsis;cursor:pointer;'
|
||||
+ 'text-shadow:0 1px 1px rgba(0,0,0,.3);box-shadow:0 1px 2px rgba(0,0,0,.12)">'
|
||||
+ inner + '</div>';
|
||||
// Pausen-Schwanz: halbhoch, gedämpft, blinkt langsam — „läuft noch, aber gerade ruhig".
|
||||
if (isPausedRun) {
|
||||
var halfH = 9;
|
||||
// Pausen im Verlauf: jede geloggte Pausen-Spanne bleibt als halbhohes,
|
||||
// gedämpftes Segment im Balken stehen — auch nachdem die Schüler:in wieder
|
||||
// weiterarbeitet. So sieht man, WANN und WIE LANGE pausiert wurde.
|
||||
var spans = sess.pauseSpans || [];
|
||||
var halfH = 9, halfTop = 5 + barH - halfH;
|
||||
if (spans.length) {
|
||||
spans.forEach(function(sp){
|
||||
if (!sp || !sp.s || !sp.e) return;
|
||||
var a = _msToPct(sp.s), b = _msToPct(sp.e);
|
||||
var w = Math.max(0.4, b - a);
|
||||
var live = (Math.abs(sp.e - endMs) < 6000); // die offene (laufende) Pause blinkt
|
||||
html += '<div title="Pause '+_fmtHM(sp.s)+'–'+_fmtHM(sp.e)+'" '
|
||||
+ 'style="position:absolute;left:'+a+'%;width:'+w+'%;top:'+halfTop+'px;height:'+halfH+'px;'
|
||||
+ 'background:'+col+';opacity:.4;border-radius:2px;border:1px dashed rgba(255,255,255,.55);'
|
||||
+ (live?'animation:_tagblink 2.4s ease-in-out infinite;':'')+'"></div>';
|
||||
});
|
||||
} else if (isPausedRun) {
|
||||
// Fallback ohne geloggte Spannen (z. B. Sim-Pause via phase): aktueller Schwanz.
|
||||
var tailW = Math.max(0.6, _msToPct(endMs) - pctR);
|
||||
html += '<div title="pausiert seit '+_fmtHM(mainEndMs)+'" '
|
||||
+ 'style="position:absolute;left:'+pctR+'%;width:'+tailW+'%;top:'+(5+barH-halfH)+'px;height:'+halfH+'px;'
|
||||
+ 'style="position:absolute;left:'+pctR+'%;width:'+tailW+'%;top:'+halfTop+'px;height:'+halfH+'px;'
|
||||
+ 'background:'+col+';opacity:.42;border-radius:0 3px 3px 0;'
|
||||
+ 'border:1px dashed rgba(255,255,255,.6);animation:_tagblink 2.4s ease-in-out infinite"></div>';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user