From bffa7203dfd333b699bc29a22c74fb602eea4ea1 Mon Sep 17 00:00:00 2001 From: Héctor Ramón Jiménez Date: Sun, 7 Nov 2021 18:15:01 +0700 Subject: Create `iced_lazy` and draft `Component` trait --- native/src/overlay/element.rs | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'native') diff --git a/native/src/overlay/element.rs b/native/src/overlay/element.rs index f418a518..24b39ced 100644 --- a/native/src/overlay/element.rs +++ b/native/src/overlay/element.rs @@ -25,6 +25,11 @@ where Self { position, overlay } } + /// Returns the position of the [`Element`]. + pub fn position(&self) -> Point { + self.position + } + /// Translates the [`Element`]. pub fn translate(mut self, translation: Vector) -> Self { self.position = self.position + translation; -- cgit