Add more attributes

This commit is contained in:
JMS55 2023-12-22 16:51:48 -08:00
parent a6c6eb981d
commit ba5429b938
2 changed files with 6 additions and 0 deletions

View file

@ -1,5 +1,6 @@
macro_rules! node_attributes { macro_rules! node_attributes {
() => { () => {
pub const animate: AttributeDescription = ("animate", None, false);
pub const display: AttributeDescription = ("display", None, false); pub const display: AttributeDescription = ("display", None, false);
pub const position: AttributeDescription = ("position", None, false); pub const position: AttributeDescription = ("position", None, false);
pub const overflow: AttributeDescription = ("overflow", 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 translation_y: AttributeDescription = ("translation", None, false);
pub const rotation: AttributeDescription = ("rotation", None, false); pub const rotation: AttributeDescription = ("rotation", None, false);
pub const scale: AttributeDescription = ("scale", 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 visibility: AttributeDescription = ("visibility", None, false);
pub const z_index: AttributeDescription = ("z_index", None, false); pub const z_index: AttributeDescription = ("z_index", None, false);
}; };

View file

@ -46,6 +46,7 @@ impl HotReloadingContext for HotReloadContext {
if let dioxus_elements::node::TAG_NAME | dioxus_elements::text::TAG_NAME = element_name_rust if let dioxus_elements::node::TAG_NAME | dioxus_elements::text::TAG_NAME = element_name_rust
{ {
match attribute_name_rust { match attribute_name_rust {
"animate" => Some(("animate", None)),
"display" => Some(("display", None)), "display" => Some(("display", None)),
"position" => Some(("position", None)), "position" => Some(("position", None)),
"overflow" => Some(("overflow", None)), "overflow" => Some(("overflow", None)),
@ -105,6 +106,8 @@ impl HotReloadingContext for HotReloadContext {
"translation_y" => Some(("translation_y", None)), "translation_y" => Some(("translation_y", None)),
"rotation" => Some(("rotation", None)), "rotation" => Some(("rotation", None)),
"scale" => Some(("scale", None)), "scale" => Some(("scale", None)),
"scale_x" => Some(("scale_x", None)),
"scale_y" => Some(("scale_y", None)),
"visibility" => Some(("visibility", None)), "visibility" => Some(("visibility", None)),
"z_index" => Some(("z_index", None)), "z_index" => Some(("z_index", None)),
_ => None, _ => None,