This commit is contained in:
+10
-10
@@ -1322,16 +1322,16 @@ function buildPdfBytes(lines){
|
|||||||
const rowH=Math.max(25,leftStep-4);
|
const rowH=Math.max(25,leftStep-4);
|
||||||
rect(46,leftY-rowH+7,214,rowH,index%2?"0.055 0.071 0.106":"0.063 0.082 0.122");
|
rect(46,leftY-rowH+7,214,rowH,index%2?"0.055 0.071 0.106":"0.063 0.082 0.122");
|
||||||
rect(46,leftY-rowH+7,4,rowH,itemNo%2?"0 0.941 1":"1 0.176 0.471");
|
rect(46,leftY-rowH+7,4,rowH,itemNo%2?"0 0.941 1":"1 0.176 0.471");
|
||||||
text(String(itemNo).padStart(2,"0"),57,leftY-8,7,"F2","0.35 0.52 0.61");
|
text(String(itemNo).padStart(2,"0"),57,leftY-8,8,"F2","0.35 0.52 0.61");
|
||||||
const amount=row.item.match(/^(.*\S)\s+([0-9][0-9.,]*\s*(?:g|%|ml))$/i);
|
const amount=row.item.match(/^(.*\S)\s+([0-9][0-9.,]*\s*(?:g|%|ml))$/i);
|
||||||
if(amount){
|
if(amount){
|
||||||
const labelLines=wrapped(amount[1],20).slice(0,2);
|
const labelLines=wrapped(amount[1],17).slice(0,2);
|
||||||
labelLines.forEach((part,i)=>text(part,82,leftY-6-i*10,8.2,"F1","0.922 0.965 1"));
|
labelLines.forEach((part,i)=>text(part,82,leftY-7-i*12,10.2,"F1","0.922 0.965 1"));
|
||||||
const amountX=Math.max(184,248-amount[2].length*6.1);
|
const amountX=Math.max(184,248-amount[2].length*7.2);
|
||||||
text(amount[2],amountX,leftY-7,10,"F2",itemNo%2?"0 0.941 1":"1 0.176 0.471");
|
text(amount[2],amountX,leftY-8,12,"F2",itemNo%2?"0 0.941 1":"1 0.176 0.471");
|
||||||
}else{
|
}else{
|
||||||
const itemLines=wrapped(row.item,34).slice(0,2);
|
const itemLines=wrapped(row.item,28).slice(0,2);
|
||||||
itemLines.forEach((part,i)=>text(part,78,leftY-5-i*10,8.3,"F1","0.922 0.965 1"));
|
itemLines.forEach((part,i)=>text(part,78,leftY-6-i*12,9.8,"F1","0.922 0.965 1"));
|
||||||
}
|
}
|
||||||
leftY-=leftStep; itemNo++;
|
leftY-=leftStep; itemNo++;
|
||||||
});
|
});
|
||||||
@@ -1349,9 +1349,9 @@ function buildPdfBytes(lines){
|
|||||||
const action=parts.length?parts.join(" — "):raw;
|
const action=parts.length?parts.join(" — "):raw;
|
||||||
rect(304,y-2,10,10,"0.043 0.059 0.086","0 0.941 1",1);
|
rect(304,y-2,10,10,"0.043 0.059 0.086","0 0.941 1",1);
|
||||||
rect(307,y+1,4,4,index===steps.length-1?"1 0.176 0.471":"0 0.941 1");
|
rect(307,y+1,4,4,index===steps.length-1?"1 0.176 0.471":"0 0.941 1");
|
||||||
text(when,324,y+1,8.6,"F2",index===steps.length-1?"1 0.176 0.471":"0 0.941 1");
|
text(when,324,y+1,10.5,"F2",index===steps.length-1?"1 0.176 0.471":"0 0.941 1");
|
||||||
const actionLines=wrapped(action,38).slice(0,2);
|
const actionLines=wrapped(action,31).slice(0,2);
|
||||||
actionLines.forEach((part,row)=>text(part,324,y-11-row*10,7.8,"F1","0.922 0.965 1"));
|
actionLines.forEach((part,row)=>text(part,324,y-13-row*12,9.3,"F1","0.922 0.965 1"));
|
||||||
if(index<steps.length-1) line(324,y-slot+9,545,y-slot+9,"0.12 0.19 0.24",.35);
|
if(index<steps.length-1) line(324,y-slot+9,545,y-slot+9,"0.12 0.19 0.24",.35);
|
||||||
});
|
});
|
||||||
if(!steps.length) text("Kein Zeitplan vorhanden",324,530,8.5,"F1","0.53 0.64 0.74");
|
if(!steps.length) text("Kein Zeitplan vorhanden",324,530,8.5,"F1","0.53 0.64 0.74");
|
||||||
|
|||||||
Reference in New Issue
Block a user