Skip to content

Commit 8fe99ed

Browse files
committed
component overlay position fix
1 parent a3744ec commit 8fe99ed

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

lazy/src/component.rs

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -263,14 +263,16 @@ where
263263
.build(),
264264
);
265265

266-
cache.as_ref().unwrap().borrow_overlay().is_some()
266+
cache
267+
.as_ref()
268+
.unwrap()
269+
.borrow_overlay()
270+
.as_ref()
271+
.map(|overlay| overlay.position())
267272
});
268273

269-
has_overlay.then(|| {
270-
overlay::Element::new(
271-
layout.position(),
272-
Box::new(Overlay { instance: self }),
273-
)
274+
has_overlay.map(|pos| {
275+
overlay::Element::new(pos, Box::new(Overlay { instance: self }))
274276
})
275277
}
276278
}

0 commit comments

Comments
 (0)