You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 7, 2026. It is now read-only.
change the scoping and coordinate resolution to allow updates of ctx.prev:
#letcomponent(...) = {
...// resolve coordinates and update the contextget-ctx(ctx=> {
let (ctx, ..position) = cetz.coordinates.resolve(ctx, ..position)
set-ctx(_=> { ctx }) // update the context, so "ctx.prev" is correct// wrap all component logic/drawing inside scopes or groups, so that it does not alter the context any furtherscope({
// draw the component here...
})
// the scope/group will reset the context (and keep the anchors)
})
}
Contribute
I am willing to submit a pull request for this feature
The problem
Currently, zap does not allow cetz to update the last used coordinate
Proposed Solution
change the scoping and coordinate resolution to allow updates of
ctx.prev:Contribute