Cull out of bounds rich_text during draw
This commit is contained in:
parent
7336a18443
commit
c2155b82b3
1 changed files with 4 additions and 0 deletions
|
|
@ -239,6 +239,10 @@ where
|
||||||
cursor: mouse::Cursor,
|
cursor: mouse::Cursor,
|
||||||
viewport: &Rectangle,
|
viewport: &Rectangle,
|
||||||
) {
|
) {
|
||||||
|
if !layout.bounds().intersects(viewport) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
let state = tree
|
let state = tree
|
||||||
.state
|
.state
|
||||||
.downcast_ref::<State<Link, Renderer::Paragraph>>();
|
.downcast_ref::<State<Link, Renderer::Paragraph>>();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue