diff --git a/index.html b/index.html index c2cd84a..50916f9 100644 --- a/index.html +++ b/index.html @@ -1322,16 +1322,16 @@ function buildPdfBytes(lines){ 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,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); if(amount){ - const labelLines=wrapped(amount[1],20).slice(0,2); - labelLines.forEach((part,i)=>text(part,82,leftY-6-i*10,8.2,"F1","0.922 0.965 1")); - const amountX=Math.max(184,248-amount[2].length*6.1); - text(amount[2],amountX,leftY-7,10,"F2",itemNo%2?"0 0.941 1":"1 0.176 0.471"); + const labelLines=wrapped(amount[1],17).slice(0,2); + 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*7.2); + text(amount[2],amountX,leftY-8,12,"F2",itemNo%2?"0 0.941 1":"1 0.176 0.471"); }else{ - const itemLines=wrapped(row.item,34).slice(0,2); - itemLines.forEach((part,i)=>text(part,78,leftY-5-i*10,8.3,"F1","0.922 0.965 1")); + const itemLines=wrapped(row.item,28).slice(0,2); + itemLines.forEach((part,i)=>text(part,78,leftY-6-i*12,9.8,"F1","0.922 0.965 1")); } leftY-=leftStep; itemNo++; }); @@ -1349,9 +1349,9 @@ function buildPdfBytes(lines){ 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(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"); - const actionLines=wrapped(action,38).slice(0,2); - actionLines.forEach((part,row)=>text(part,324,y-11-row*10,7.8,"F1","0.922 0.965 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,31).slice(0,2); + actionLines.forEach((part,row)=>text(part,324,y-13-row*12,9.3,"F1","0.922 0.965 1")); if(index