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