component overlay position fix

This commit is contained in:
cossonleo 2022-01-20 11:10:07 +08:00
parent a3744ec97a
commit 41bd984d6b

View file

@ -263,14 +263,16 @@ where
.build(), .build(),
); );
cache.as_ref().unwrap().borrow_overlay().is_some() cache
.as_ref()
.unwrap()
.borrow_overlay()
.as_ref()
.map(|overlay| overlay.position())
}); });
has_overlay.then(|| { has_overlay.map(|pos| {
overlay::Element::new( overlay::Element::new(pos, Box::new(Overlay { instance: self }))
layout.position(),
Box::new(Overlay { instance: self }),
)
}) })
} }
} }