Skip to content

Commit

Permalink
coordinate: Fixups
Browse files Browse the repository at this point in the history
  • Loading branch information
johannes-wolf committed Oct 18, 2024
1 parent c22d506 commit 645b111
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions src/coordinate.typ
Original file line number Diff line number Diff line change
Expand Up @@ -294,9 +294,6 @@
} else {
"element"
}
} else if ctx.at("resolve-system", default: none) != none {
ctx.resolve-system = none
resolve-system(ctx, c)
}

if t == none {
Expand All @@ -322,16 +319,16 @@
/// - update (bool): Update the context's last position
/// -> array
#let resolve(ctx, ..coordinates, update: true) = {
let resolver = if type(ctx.resolve-coordinate) == array {
let resolvers = if type(ctx.resolve-coordinate) == array {
ctx.resolve-coordinate
} else {
()
}

let result = ()
for c in coordinates.pos() {
for i in range(1, resolver.len() + 1) {
c = (resolver.at(resolver.len() - i))(ctx, c)
for resolver in resolvers.rev() {
c = resolver(ctx, c)
}

let t = resolve-system(ctx, c)
Expand Down
Binary file modified tests/coordinate/custom/ref/1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 645b111

Please sign in to comment.