aboutsummaryrefslogtreecommitdiff
path: root/src/dimension_indicator.rs
diff options
context:
space:
mode:
authorArne Dußin2020-11-15 19:47:39 +0100
committerArne Dußin2020-11-15 19:47:39 +0100
commitaff7416b65281458ba478ec24b77d94b183e3b82 (patch)
tree5c7777b318a6fa8b85d76521a6781c8eae60ce63 /src/dimension_indicator.rs
parent6aabd0123961d90095df3cefefeb0718f94aa6fc (diff)
downloadgraf_karto-aff7416b65281458ba478ec24b77d94b183e3b82.tar.gz
graf_karto-aff7416b65281458ba478ec24b77d94b183e3b82.zip
Fix the dimension indicators persisting after add
The dimension indicators were drawn very for the blink of an eye when starting a rect that comes after the first. This commit should fix that.
Diffstat (limited to 'src/dimension_indicator.rs')
-rw-r--r--src/dimension_indicator.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/dimension_indicator.rs b/src/dimension_indicator.rs
index 0ea96d3..2eb3eee 100644
--- a/src/dimension_indicator.rs
+++ b/src/dimension_indicator.rs
@@ -24,6 +24,10 @@ impl DimensionIndicator {
this
}
+ pub fn clear_dimensions(&mut self) {
+ self.length_lines.clear();
+ }
+
/// Update the dimensions by analysing a given set of points and adjusting the internal
/// (measured) dimensions.
pub fn update_dimensions(&mut self, corner_points: &[Vec2<f32>]) {