From ba5429b93864486e100cf3f65a04df8502ef39ad Mon Sep 17 00:00:00 2001 From: JMS55 <47158642+JMS55@users.noreply.github.com> Date: Fri, 22 Dec 2023 16:51:48 -0800 Subject: [PATCH] Add more attributes --- src/elements.rs | 3 +++ src/hot_reload.rs | 3 +++ 2 files changed, 6 insertions(+) diff --git a/src/elements.rs b/src/elements.rs index 0c58ab3..ca35689 100644 --- a/src/elements.rs +++ b/src/elements.rs @@ -1,5 +1,6 @@ macro_rules! node_attributes { () => { + pub const animate: AttributeDescription = ("animate", None, false); pub const display: AttributeDescription = ("display", None, false); pub const position: AttributeDescription = ("position", None, false); pub const overflow: AttributeDescription = ("overflow", None, false); @@ -60,6 +61,8 @@ macro_rules! node_attributes { pub const translation_y: AttributeDescription = ("translation", None, false); pub const rotation: AttributeDescription = ("rotation", None, false); pub const scale: AttributeDescription = ("scale", None, false); + pub const scale_x: AttributeDescription = ("scale_x", None, false); + pub const scale_y: AttributeDescription = ("scale_y", None, false); pub const visibility: AttributeDescription = ("visibility", None, false); pub const z_index: AttributeDescription = ("z_index", None, false); }; diff --git a/src/hot_reload.rs b/src/hot_reload.rs index 6686b3d..f236294 100644 --- a/src/hot_reload.rs +++ b/src/hot_reload.rs @@ -46,6 +46,7 @@ impl HotReloadingContext for HotReloadContext { if let dioxus_elements::node::TAG_NAME | dioxus_elements::text::TAG_NAME = element_name_rust { match attribute_name_rust { + "animate" => Some(("animate", None)), "display" => Some(("display", None)), "position" => Some(("position", None)), "overflow" => Some(("overflow", None)), @@ -105,6 +106,8 @@ impl HotReloadingContext for HotReloadContext { "translation_y" => Some(("translation_y", None)), "rotation" => Some(("rotation", None)), "scale" => Some(("scale", None)), + "scale_x" => Some(("scale_x", None)), + "scale_y" => Some(("scale_y", None)), "visibility" => Some(("visibility", None)), "z_index" => Some(("z_index", None)), _ => None,