Show text on occlusion cards regardless of occludeInactive (#4387)

* Show text on occlusion cards regardless of `occludeInactive`.

Before this change, on an image occlusion card, a text box was visible
during editing but not visible during review. This change makes text
visible even if other shapes would be hidden.

* Move fix to render_image_occlusion()

---------

Co-authored-by: jariji <jariji>
Co-authored-by: Abdo <abdo@abdnh.net>
This commit is contained in:
jariji 2025-10-28 22:51:55 -07:00 committed by GitHub
parent 739e41ce16
commit da5b8cb5b4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 3 additions and 4 deletions

View file

@ -253,6 +253,7 @@ arold0 <arold0@icloud.com>
nav1s <nav1s@proton.me>
Ranjit Odedra <ranjitodedra.dev@gmail.com>
Eltaurus <https://github.com/Eltaurus-Lt>
jariji
********************

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