From 20dff512d0d665d03bbf241fd5894db412ac3497 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Sat, 13 Feb 2021 01:45:55 +0000 Subject: [PATCH] SimpleShape: Make INVISIBLE_EDGE_SENSITIVE a const nfc Signed-off-by: Ian Jackson --- src/pieces.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/pieces.rs b/src/pieces.rs index 2cb8fd18..c0c02d10 100644 --- a/src/pieces.rs +++ b/src/pieces.rs @@ -25,6 +25,7 @@ struct SimpleShape { pub const SELECT_SCALE: f64 = 1.1; pub const DEFAULT_EDGE_WIDTH: f64 = 0.2; +pub const INVISIBLE_EDGE_SENSITIVE: f64 = 2.; fn default_edge_width() -> f64 { DEFAULT_EDGE_WIDTH } @@ -139,7 +140,8 @@ impl Piece for SimpleShape { if self.colours.len() == 0 { write!(f, r##""##, + stroke-width="{}" stroke="transparent" d="{}"/>"##, + INVISIBLE_EDGE_SENSITIVE, &self.path.0)?; } write!(f, r##"