forked from HEL/chronos
		
	grouped some elmt defs in misc.typ
This commit is contained in:
		@@ -3,41 +3,6 @@
 | 
			
		||||
#import "core/setup.typ": setup
 | 
			
		||||
#import "core/utils.typ": fit-canvas, set-ctx
 | 
			
		||||
 | 
			
		||||
#let gap-render(gap) = set-ctx(ctx => {
 | 
			
		||||
  ctx.y -= gap.size
 | 
			
		||||
  return ctx
 | 
			
		||||
})
 | 
			
		||||
 | 
			
		||||
#let _gap(size: 20) = {
 | 
			
		||||
  return ((
 | 
			
		||||
    type: "gap",
 | 
			
		||||
    draw: gap-render,
 | 
			
		||||
    size: size
 | 
			
		||||
  ),)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
#let _evt(participant, event) = {
 | 
			
		||||
  return ((
 | 
			
		||||
    type: "evt",
 | 
			
		||||
    draw: evt-render,
 | 
			
		||||
    participant: participant,
 | 
			
		||||
    event: event,
 | 
			
		||||
    lifeline-style: auto
 | 
			
		||||
  ),)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
#let _col(p1, p2, width: auto, margin: 0, min-width: 0, max-width: none) = {
 | 
			
		||||
  return ((
 | 
			
		||||
    type: "col",
 | 
			
		||||
    p1: p1,
 | 
			
		||||
    p2: p2,
 | 
			
		||||
    width: width,
 | 
			
		||||
    margin: margin,
 | 
			
		||||
    min-width: min-width,
 | 
			
		||||
    max-width: max-width
 | 
			
		||||
  ),)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
#let diagram(elements, width: auto) = {
 | 
			
		||||
  if elements == none {
 | 
			
		||||
    return
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user