summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJovansonlee Cesar <ivanceras@gmail.com>2022-09-25 15:36:18 +0800
committerJovansonlee Cesar <ivanceras@gmail.com>2022-09-25 15:36:18 +0800
commit090f96e1e787e171d32683723c4b8aa0829d0daa (patch)
tree81fbd27d907efad36d28a3b44f0e11db0c20b15b
parenta23f6749ab8261b96ef0bf8766d21a9060c7234d (diff)
refactor: use correct names of variables
-rw-r--r--Cargo.lock4
-rw-r--r--TODO.md1
-rw-r--r--packages/svgbob/src/buffer/cell_buffer/contacts.rs11
3 files changed, 10 insertions, 6 deletions
diff --git a/Cargo.lock b/Cargo.lock
index 9fbbf22..d56972d 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -768,6 +768,8 @@ dependencies = [
[[package]]
name = "sauron"
version = "0.51.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "72fdab903ddb1a159f609103bce0fcc4573a6fa02b413e7316170bed4e5b8137"
dependencies = [
"cfg-if 0.1.10",
"sauron-core",
@@ -776,6 +778,8 @@ dependencies = [
[[package]]
name = "sauron-core"
version = "0.51.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6069f6eca98b672ceefa2d00bbe1ad527fb932217868ea6ac2e331c8dc523a2f"
dependencies = [
"cfg-if 0.1.10",
"doc-comment",
diff --git a/TODO.md b/TODO.md
index 8965619..78aabd6 100644
--- a/TODO.md
+++ b/TODO.md
@@ -35,3 +35,4 @@
- [ ] Try again to endorse the span of the grouped fragments that are in the same span
but not reduces into a single shape
- [ ] Move the modules into flat structure as possible rather than deep
+- [ ] Make use of dot canvas for circles that are larger than radius 10.
diff --git a/packages/svgbob/src/buffer/cell_buffer/contacts.rs b/packages/svgbob/src/buffer/cell_buffer/contacts.rs
index 649b63d..d6342e4 100644
--- a/packages/svgbob/src/buffer/cell_buffer/contacts.rs
+++ b/packages/svgbob/src/buffer/cell_buffer/contacts.rs
@@ -80,18 +80,17 @@ impl Contacts {
/// to fragments that are touching, to be promoted to a shape.
/// These includes: rect, roundedrect,
pub(crate) fn endorse_rects(
- groups: Vec<Contacts>,
+ spans: Vec<Contacts>,
) -> Endorse<FragmentSpan, Contacts> {
let mut accepted = vec![];
let mut rejects: Vec<Contacts> = vec![];
- for group in groups {
- if let Some(fragment) = group.endorse_rect() {
- //TODO: use the fragment span at group.0
- let span = group.span();
+ for span in spans {
+ if let Some(fragment) = span.endorse_rect() {
+ let span = span.span();
let fragment_span = FragmentSpan::new(span, fragment);
accepted.push(fragment_span);
} else {
- rejects.push(group);
+ rejects.push(span);
}
}
Endorse { accepted, rejects }