mirror of
https://github.com/ankitects/anki.git
synced 2025-11-07 13:17:12 -05:00
Move fix to render_image_occlusion()
This commit is contained in:
parent
9b270bcad1
commit
b1fde597ce
2 changed files with 2 additions and 4 deletions
|
|
@ -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),
|
||||||
|
|
|
||||||
|
|
@ -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,
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue