diff --git a/backstop_data/bitmaps_reference/action-1b-9-94e3-na_m.png b/backstop_data/bitmaps_reference/action-1b-9-94e3-na_m.png index 73ee5e6..d586853 100644 Binary files a/backstop_data/bitmaps_reference/action-1b-9-94e3-na_m.png and b/backstop_data/bitmaps_reference/action-1b-9-94e3-na_m.png differ diff --git a/backstop_data/bitmaps_reference/action-cs-26e5t-r2-na_m.png b/backstop_data/bitmaps_reference/action-cs-26e5t-r2-na_m.png index a6ce179..28c8d8f 100644 Binary files a/backstop_data/bitmaps_reference/action-cs-26e5t-r2-na_m.png and b/backstop_data/bitmaps_reference/action-cs-26e5t-r2-na_m.png differ diff --git a/backstop_data/bitmaps_reference/action-cs-2e1-r3-na-r1-o_m.png b/backstop_data/bitmaps_reference/action-cs-2e1-r3-na-r1-o_m.png index f28d76d..7118093 100644 Binary files a/backstop_data/bitmaps_reference/action-cs-2e1-r3-na-r1-o_m.png and b/backstop_data/bitmaps_reference/action-cs-2e1-r3-na-r1-o_m.png differ diff --git a/backstop_data/bitmaps_reference/action-cs-2e4-r1-na_m.png b/backstop_data/bitmaps_reference/action-cs-2e4-r1-na_m.png index d1848c6..9cc33eb 100644 Binary files a/backstop_data/bitmaps_reference/action-cs-2e4-r1-na_m.png and b/backstop_data/bitmaps_reference/action-cs-2e4-r1-na_m.png differ diff --git a/backstop_data/bitmaps_reference/action-error-23e4-r1-na_m.png b/backstop_data/bitmaps_reference/action-error-23e4-r1-na_m.png index 9fb23dc..889b0c5 100644 Binary files a/backstop_data/bitmaps_reference/action-error-23e4-r1-na_m.png and b/backstop_data/bitmaps_reference/action-error-23e4-r1-na_m.png differ diff --git a/backstop_data/bitmaps_reference/action-error-25e1t-r3-na_m.png b/backstop_data/bitmaps_reference/action-error-25e1t-r3-na_m.png index 3f02499..3f7f551 100644 Binary files a/backstop_data/bitmaps_reference/action-error-25e1t-r3-na_m.png and b/backstop_data/bitmaps_reference/action-error-25e1t-r3-na_m.png differ diff --git a/backstop_data/bitmaps_reference/action-error-poa-r1-na_m.png b/backstop_data/bitmaps_reference/action-error-poa-r1-na_m.png index 2eb3d88..026f5ae 100644 Binary files a/backstop_data/bitmaps_reference/action-error-poa-r1-na_m.png and b/backstop_data/bitmaps_reference/action-error-poa-r1-na_m.png differ diff --git a/backstop_data/bitmaps_reference/action-error-poa-r2-na_m.png b/backstop_data/bitmaps_reference/action-error-poa-r2-na_m.png index 074cdea..66f3f60 100644 Binary files a/backstop_data/bitmaps_reference/action-error-poa-r2-na_m.png and b/backstop_data/bitmaps_reference/action-error-poa-r2-na_m.png differ diff --git a/backstop_data/bitmaps_reference/action-error-poa-r3-na_m.png b/backstop_data/bitmaps_reference/action-error-poa-r3-na_m.png index c614561..9b71c54 100644 Binary files a/backstop_data/bitmaps_reference/action-error-poa-r3-na_m.png and b/backstop_data/bitmaps_reference/action-error-poa-r3-na_m.png differ diff --git a/backstop_data/bitmaps_reference/action-pocsen-r3_m.png b/backstop_data/bitmaps_reference/action-pocsen-r3_m.png index 2c78b0c..5339254 100644 Binary files a/backstop_data/bitmaps_reference/action-pocsen-r3_m.png and b/backstop_data/bitmaps_reference/action-pocsen-r3_m.png differ diff --git a/utils/wbsc-eval.ts b/utils/wbsc-eval.ts index 9f55c24..f542274 100644 --- a/utils/wbsc-eval.ts +++ b/utils/wbsc-eval.ts @@ -622,6 +622,11 @@ function processInput (input: WBSCInput, batter: number): WBSCOutput { output.base = input.origBase + 1 } possibleConcurrentPlay = true + // do not wrap "short" no-advance plays + if (output.na && output.text1.length < 3 && output.text2.length < 4) { + output.text1 += output.text2 + output.text2 = undefined + } break case 'POEN': case 'POCSEN': diff --git a/utils/wbsc-output.ts b/utils/wbsc-output.ts index be19072..30d7397 100644 --- a/utils/wbsc-output.ts +++ b/utils/wbsc-output.ts @@ -282,7 +282,7 @@ function writeSituation (output: WBSCOutput) { const sub = output.sub const na = output.na - let text1 = output.text1 + const text1 = output.text1 const text2 = output.text2 const ctx = useCanvasStore().ctx @@ -356,13 +356,13 @@ function writeSituation (output: WBSCOutput) { break case 1: if (na) { - if (text2) { - text1 += text2 - } ctx.font = FONT_EXTRA_TINY locHOffset = (text1.length - 3) * 6 ctx.fillStyle = '#303030' - ctx.fillText(text1, w2 * 1.5 + 25 - locHOffset + hOffset, h2 + 24 + vOffset) + ctx.fillText(text1, w2 * 1.5 + 25 - locHOffset + hOffset, h2 + 23 + vOffset) + if (text2) { + ctx.fillText(text2, w2 * 1.5 + 25 - locHOffset + hOffset, h2 + 44 + vOffset) + } } else { if (hit) { drawHitSymbol(1) @@ -431,12 +431,12 @@ function writeSituation (output: WBSCOutput) { break case 2: if (na) { - if (text2) { - text1 += text2 - } ctx.font = FONT_EXTRA_TINY ctx.fillStyle = '#303030' ctx.fillText(text1, w2 + hOffset, offset + 10 + vOffset) + if (text2) { + ctx.fillText(text2, w2 + hOffset, offset + 32 + vOffset) + } } else { if (hit) { drawHitSymbol(2) @@ -541,13 +541,13 @@ function writeSituation (output: WBSCOutput) { break case 3: if (na) { - if (text2) { - text1 += text2 - } ctx.font = FONT_EXTRA_TINY locHOffset = (text1.length - 3) * 6 ctx.fillStyle = '#303030' - ctx.fillText(text1, w2 * 0.5 - 25 + locHOffset + hOffset, h2 - 8 + vOffset) + ctx.fillText(text1, w2 * 0.5 - 25 + locHOffset + hOffset, h2 - 5 + vOffset) + if (text2) { + ctx.fillText(text2, w2 * 0.5 - 25 + locHOffset + hOffset, h2 + 20 + vOffset) + } } else { if (hit) { drawHitSymbol(3)