removed some constants
This commit is contained in:
		| @@ -42,9 +42,9 @@ | ||||
| #let get-size(note) = { | ||||
|   let style = note.resolved-style | ||||
|   let PAD = if style.shape == "hex" {NOTE-HEX-PAD} else {NOTE-PAD} | ||||
|   let m = measure(box(note.content)) | ||||
|   let w = m.width / 1pt + PAD.last() * 2 | ||||
|   let h = m.height / 1pt + PAD.first() * 2 | ||||
|   let m = normalize-measure(box(note.content)) | ||||
|   let w = m.width + PAD.last() * 2 | ||||
|   let h = m.height + PAD.first() * 2 | ||||
|   if style.shape == "default" { | ||||
|     w += NOTE-CORNER-SIZE | ||||
|   } | ||||
| @@ -90,9 +90,11 @@ | ||||
| #let render(note, y: auto, forced: false) = { | ||||
|   if not note.linked { | ||||
|     if not note.aligned { | ||||
|       set-ctx(c => { | ||||
|         c.y -= Y-SPACE | ||||
|         return c | ||||
|       get-ctx(ctx => { | ||||
|         set-ctx(c => { | ||||
|           c.y -= ctx.style.y-space | ||||
|           return c | ||||
|         }) | ||||
|       }) | ||||
|     } | ||||
|   } else if not forced { | ||||
|   | ||||
| @@ -49,7 +49,7 @@ | ||||
| #let is-cross-tip = is-tip-of-type.with("x") | ||||
|  | ||||
| #let render(seq) = get-ctx(ctx => { | ||||
|   ctx.y -= Y-SPACE | ||||
|   ctx.y -= ctx.style.y-space | ||||
|  | ||||
|   let i1 = ctx.pars-i.at(seq.p1) | ||||
|   let i2 = ctx.pars-i.at(seq.p2) | ||||
|   | ||||
| @@ -422,9 +422,11 @@ | ||||
|     } | ||||
|   } | ||||
|  | ||||
|   set-ctx(ctx => { | ||||
|     ctx.y -= Y-SPACE | ||||
|     return ctx | ||||
|   get-ctx(ctx => { | ||||
|     set-ctx(c => { | ||||
|       c.y -= ctx.style.y-space | ||||
|       return c | ||||
|     }) | ||||
|   }) | ||||
|  | ||||
|   draw.on-layer(-1, { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user