Skip to content

Commit 645b111

Browse files
committed
coordinate: Fixups
1 parent c22d506 commit 645b111

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

src/coordinate.typ

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -294,9 +294,6 @@
294294
} else {
295295
"element"
296296
}
297-
} else if ctx.at("resolve-system", default: none) != none {
298-
ctx.resolve-system = none
299-
resolve-system(ctx, c)
300297
}
301298

302299
if t == none {
@@ -322,16 +319,16 @@
322319
/// - update (bool): Update the context's last position
323320
/// -> array
324321
#let resolve(ctx, ..coordinates, update: true) = {
325-
let resolver = if type(ctx.resolve-coordinate) == array {
322+
let resolvers = if type(ctx.resolve-coordinate) == array {
326323
ctx.resolve-coordinate
327324
} else {
328325
()
329326
}
330327

331328
let result = ()
332329
for c in coordinates.pos() {
333-
for i in range(1, resolver.len() + 1) {
334-
c = (resolver.at(resolver.len() - i))(ctx, c)
330+
for resolver in resolvers.rev() {
331+
c = resolver(ctx, c)
335332
}
336333

337334
let t = resolve-system(ctx, c)

tests/coordinate/custom/ref/1.png

20 Bytes
Loading

0 commit comments

Comments
 (0)