Skip to content

Commit

Permalink
component overlay position fix
Browse files Browse the repository at this point in the history
  • Loading branch information
cossonleo committed Jan 20, 2022
1 parent a3744ec commit c5dbfb2
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions lazy/src/component.rs
Original file line number Diff line number Diff line change
Expand Up @@ -263,14 +263,15 @@ where
.build(),
);

cache.as_ref().unwrap().borrow_overlay().is_some()
cache
.as_ref()
.unwrap()
.borrow_overlay()
.map(|overlay| overlay.position())
});

has_overlay.then(|| {
overlay::Element::new(
layout.position(),
Box::new(Overlay { instance: self }),
)
has_overlay.map(|pos| {
overlay::Element::new(pos, Box::new(Overlay { instance: self }))
})
}
}
Expand Down

0 comments on commit c5dbfb2

Please sign in to comment.