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,
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#"<div class="cloze" data-ordinal="{}" {}></div>"#,
ordinals_str(ordinals),

View file

@ -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,