Skip to content

Commit

Permalink
Remove corner radius
Browse files Browse the repository at this point in the history
Might do it at some point.
  • Loading branch information
aleics committed Sep 17, 2024
1 parent d7a2068 commit 08847ae
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 20 deletions.
3 changes: 1 addition & 2 deletions bruc-core/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -244,8 +244,7 @@ mod tests {
"properties": {
"value": { "field": "y" },
"padAngle": 0.1,
"innerRadius": 50,
"cornerRadius": 50
"innerRadius": 50
}
}
]
Expand Down
22 changes: 4 additions & 18 deletions bruc-core/src/spec/shape/pie.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ pub(crate) struct PiePropertiesBuilder {
value: DataSource,
pad_angle: Option<f32>,
inner_radius: Option<f32>,
corner_radius: Option<f32>,
}

impl PiePropertiesBuilder {
Expand All @@ -13,7 +12,6 @@ impl PiePropertiesBuilder {
value,
pad_angle: None,
inner_radius: None,
corner_radius: None,
}
}

Expand All @@ -27,17 +25,11 @@ impl PiePropertiesBuilder {
self
}

pub(crate) fn with_corner_radius(mut self, corner_radius: f32) -> Self {
self.corner_radius = Some(corner_radius);
self
}

pub(crate) fn build(self) -> PieProperties {
PieProperties {
value: self.value,
pad_angle: self.pad_angle.unwrap_or_default(),
inner_radius: self.inner_radius.unwrap_or_default(),
corner_radius: self.corner_radius.unwrap_or_default(),
inner_radius: self.inner_radius.unwrap_or_default()
}
}
}
Expand Down Expand Up @@ -66,9 +58,7 @@ pub(crate) struct PieProperties {
#[cfg_attr(feature = "serde", serde(default))]
pub(crate) pad_angle: f32,
#[cfg_attr(feature = "serde", serde(default))]
pub(crate) inner_radius: f32,
#[cfg_attr(feature = "serde", serde(default))]
pub(crate) corner_radius: f32,
pub(crate) inner_radius: f32
}

#[cfg(test)]
Expand Down Expand Up @@ -103,8 +93,7 @@ mod serde_tests {
"properties": {
"value": { "field": "y" },
"padAngle": 0.1,
"innerRadius": 50,
"cornerRadius": 50
"innerRadius": 50
}
}"#,
)
Expand All @@ -116,7 +105,6 @@ mod serde_tests {
PiePropertiesBuilder::new(DataSource::field("y", None))
.with_pad_angle(0.1)
.with_inner_radius(50.0)
.with_corner_radius(50.0)
.build()
)
)
Expand All @@ -140,8 +128,7 @@ mod serde_tests {
r#"{
"value": { "field": "y" },
"padAngle": 0.1,
"innerRadius": 50,
"cornerRadius": 50
"innerRadius": 50
}"#,
)
.unwrap();
Expand All @@ -150,7 +137,6 @@ mod serde_tests {
PiePropertiesBuilder::new(DataSource::field("y", None))
.with_pad_angle(0.1)
.with_inner_radius(50.0)
.with_corner_radius(50.0)
.build()
);
}
Expand Down

0 comments on commit 08847ae

Please sign in to comment.