From b1fde597ce417be56db96f50779c34de0a2266d0 Mon Sep 17 00:00:00 2001 From: Abdo Date: Wed, 29 Oct 2025 08:49:36 +0300 Subject: [PATCH] Move fix to render_image_occlusion() --- rslib/src/cloze.rs | 4 +--- ts/routes/image-occlusion/review.ts | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/rslib/src/cloze.rs b/rslib/src/cloze.rs index 9df53286d..70a5d1703 100644 --- a/rslib/src/cloze.rs +++ b/rslib/src/cloze.rs @@ -260,7 +260,6 @@ fn reveal_cloze( image_occlusion_text, question, active, - cloze_ord, &cloze.ordinals, )); return; @@ -332,10 +331,9 @@ fn render_image_occlusion( text: &str, question_side: bool, active: bool, - ordinal: u16, ordinals: &[u16], ) -> String { - if (question_side && active) || ordinal == 0 { + if (question_side && active) || ordinals.contains(&0) { format!( r#"
"#, ordinals_str(ordinals), diff --git a/ts/routes/image-occlusion/review.ts b/ts/routes/image-occlusion/review.ts index 38e70b93e..4425a8141 100644 --- a/ts/routes/image-occlusion/review.ts +++ b/ts/routes/image-occlusion/review.ts @@ -212,7 +212,7 @@ function drawShapes( strokeWidth: properties.activeBorder.width, }); } - for (const shape of inactiveShapes.filter((s) => s.occludeInactive || s.ordinal === 0)) { + for (const shape of inactiveShapes.filter((s) => s.occludeInactive)) { drawShape({ context, size,