Move fix to render_image_occlusion()

This commit is contained in:
Abdo 2025-10-29 08:49:36 +03:00
parent 9b270bcad1
commit b1fde597ce
2 changed files with 2 additions and 4 deletions

View file

@ -260,7 +260,6 @@ fn reveal_cloze(
image_occlusion_text, image_occlusion_text,
question, question,
active, active,
cloze_ord,
&cloze.ordinals, &cloze.ordinals,
)); ));
return; return;
@ -332,10 +331,9 @@ fn render_image_occlusion(
text: &str, text: &str,
question_side: bool, question_side: bool,
active: bool, active: bool,
ordinal: u16,
ordinals: &[u16], ordinals: &[u16],
) -> String { ) -> String {
if (question_side && active) || ordinal == 0 { if (question_side && active) || ordinals.contains(&0) {
format!( format!(
r#"<div class="cloze" data-ordinal="{}" {}></div>"#, r#"<div class="cloze" data-ordinal="{}" {}></div>"#,
ordinals_str(ordinals), ordinals_str(ordinals),

View file

@ -212,7 +212,7 @@ function drawShapes(
strokeWidth: properties.activeBorder.width, 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({ drawShape({
context, context,
size, size,