mirror of
https://github.com/ankitects/anki.git
synced 2025-11-06 04:37:22 -05:00
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:
parent
739e41ce16
commit
da5b8cb5b4
2 changed files with 3 additions and 4 deletions
|
|
@ -189,7 +189,7 @@ Christian Donat <https://github.com/cdonat2>
|
|||
Asuka Minato <https://asukaminato.eu.org>
|
||||
Dillon Baldwin <https://github.com/DillBal>
|
||||
Voczi <https://github.com/voczi>
|
||||
Ben Nguyen <105088397+bpnguyen107@users.noreply.github.com>
|
||||
Ben Nguyen <105088397+bpnguyen107@users.noreply.github.com>
|
||||
Themis Demetriades <themis100@outlook.com>
|
||||
Luke Bartholomew <lukesbart@icloud.com>
|
||||
Gregory Abrasaldo <degeemon@gmail.com>
|
||||
|
|
@ -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
|
||||
|
||||
********************
|
||||
|
||||
|
|
|
|||
|
|
@ -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),
|
||||
|
|
|
|||
Loading…
Reference in a new issue