Skip to content

Commit 2189bb9

Browse files
authored
ComponentTransform should impl Default (#857)
Default to no change, i.e. identity transform.
1 parent 3da8681 commit 2189bb9

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

modeling-cmds/src/shared.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1084,7 +1084,8 @@ impl<T: JsonSchema> JsonSchema for TransformBy<T> {
10841084
}
10851085

10861086
/// Container that holds a translate, rotate and scale.
1087-
#[derive(Clone, Debug, PartialEq, Deserialize, JsonSchema, Serialize)]
1087+
/// Defaults to no change, everything stays the same (i.e. the identity function).
1088+
#[derive(Clone, Debug, PartialEq, Deserialize, JsonSchema, Serialize, Default)]
10881089
#[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
10891090
#[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
10901091
pub struct ComponentTransform {

0 commit comments

Comments
 (0)