Fix image support
This commit is contained in:
parent
a0355d2c71
commit
e555f2fa77
1 changed files with 4 additions and 2 deletions
|
@ -262,8 +262,10 @@ pub fn resolve_paragraphs<'a>(
|
||||||
let new_size = scale_to_fit(image_size, max_size, true);
|
let new_size = scale_to_fit(image_size, max_size, true);
|
||||||
buffer.relative_bounds =
|
buffer.relative_bounds =
|
||||||
Rect::from_min_size(Pos2::new(buffer.indent.indent, size.y), new_size);
|
Rect::from_min_size(Pos2::new(buffer.indent.indent, size.y), new_size);
|
||||||
if last_image_size.is_none() {
|
if let Some(last_image_size) = &mut last_image_size {
|
||||||
size.y += new_size.y
|
last_image_size.y -= image_size.y - new_size.y;
|
||||||
|
} else {
|
||||||
|
size.y += new_size.y + margin
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue