Skip to content

Commit

Permalink
mark: Support sep
Browse files Browse the repository at this point in the history
  • Loading branch information
johannes-wolf committed Dec 20, 2023
1 parent 82cd1db commit 84069f9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
5 changes: 4 additions & 1 deletion src/mark.typ
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@
}
let distance = 0
let drawables = ()
for style in styles {
for (i, style) in styles.enumerate() {
if style.symbol == none {
continue
}
Expand Down Expand Up @@ -179,6 +179,9 @@
)
drawables += mark.drawables
distance += mark.length
if i + 1 < styles.len() {
distance += style.sep
}
}

return (
Expand Down
3 changes: 0 additions & 3 deletions src/path-util.typ
Original file line number Diff line number Diff line change
Expand Up @@ -136,8 +136,6 @@
}
}



#let segment-at-t(segments, t, rev: false, samples: default-samples) = {
let lengths = segments.map(_segment-length.with(samples: samples))
let total = lengths.sum()
Expand All @@ -157,7 +155,6 @@
for (i, segment-length) in segments.zip(lengths).enumerate() {
let (segment, length) = segment-length
if travelled <= t and t <= travelled + length {
// if rev { panic(t - travelled) }
return (
index: if rev { segments.len() - i } else { i },
segment: segment,
Expand Down

0 comments on commit 84069f9

Please sign in to comment.