This commit is contained in:
Antonio Scandurra 2023-10-23 14:59:57 +02:00
parent a72434f67b
commit 4e6fb9034d
7 changed files with 289 additions and 198 deletions

View file

@ -58,7 +58,7 @@ impl<V: 'static + Send + Sync> Element for View<V> {
type ElementState = AnyElement<V>;
fn id(&self) -> Option<crate::ElementId> {
Some(ElementId::View(self.state.id))
Some(ElementId::View(self.state.entity_id))
}
fn initialize(
@ -159,7 +159,7 @@ trait ViewObject: 'static + Send + Sync {
impl<V: Send + Sync + 'static> ViewObject for View<V> {
fn entity_id(&self) -> EntityId {
self.state.id
self.state.entity_id
}
fn initialize(&mut self, cx: &mut WindowContext) -> AnyBox {