rep: work around index drawing bug
parent
1fb88b5059
commit
2d27ef4c2c
|
|
@ -252,16 +252,21 @@ const drawRep = () => {
|
||||||
if(i !== lastRepIndex){
|
if(i !== lastRepIndex){
|
||||||
buzzNewRep();
|
buzzNewRep();
|
||||||
lastRepIndex = i;
|
lastRepIndex = i;
|
||||||
|
|
||||||
|
const repIdx = layout["repIdx"]!;
|
||||||
|
repIdx.label = i !== null ? `Rep ${i+1}` : "Done";
|
||||||
|
|
||||||
|
// work around a bug in clearing a rotated txt(?)
|
||||||
|
layout.forgetLazyState();
|
||||||
|
layout.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
layout["play"]!.label = state.paused ? "Play" : "Pause";
|
layout["play"]!.label = state.paused ? "Play" : "Pause";
|
||||||
|
|
||||||
if(i !== null){
|
if(i !== null){
|
||||||
layout["repIdx"]!.label = `Rep ${i+1}`;
|
|
||||||
repToLabel(i, "cur");
|
repToLabel(i, "cur");
|
||||||
repToLabel(i+1, "next");
|
repToLabel(i+1, "next");
|
||||||
}else{
|
}else{
|
||||||
layout["repIdx"]!.label = "Done";
|
|
||||||
emptyLabel("cur");
|
emptyLabel("cur");
|
||||||
emptyLabel("next");
|
emptyLabel("next");
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue