chiark
/
gitweb
/
~ianmdlvl
/
otter.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7a5bac6
)
simple pieces: edge, make clickable have minimum width
author
Ian Jackson
<ijackson@chiark.greenend.org.uk>
Sat, 13 Feb 2021 01:13:07 +0000
(
01:13
+0000)
committer
Ian Jackson
<ijackson@chiark.greenend.org.uk>
Sat, 13 Feb 2021 01:47:45 +0000
(
01:47
+0000)
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
src/pieces.rs
patch
|
blob
|
history
diff --git
a/src/pieces.rs
b/src/pieces.rs
index 51695760d87769bebafe25ea36b322dfc25e09da..a749ee09e0b9bd2e0bc5cfaed6f6ca32bc0e56bb 100644
(file)
--- a/
src/pieces.rs
+++ b/
src/pieces.rs
@@
-129,6
+129,12
@@
impl Piece for SimpleShape {
otherwise.to_owned()
}
};
+ if self.colours.len() == 0 {
+ write!(&mut f.0,
+ r##"<path fill="none" \
+ stroke-width="2" stroke="transparent" d="{}"/>"##,
+ &self.path.0)?;
+ }
write!(&mut f.0, r##"<path {} {} d="{}"/>"##,
ef(&self.colours, "fill", r##"fill="none""##),
ef(&self.edges, r##"stroke-width="0.2" stroke"##, ""),