feat!: directly pass through rough js options

This commit is contained in:
Anthony Fu
2024-02-24 15:46:34 +01:00
parent 446eaa36f9
commit 57ec6a67c4
4 changed files with 17 additions and 9 deletions

View File

@@ -83,7 +83,7 @@ export function renderAnnotation(
const animate = (config.animate === undefined) ? true : (!!config.animate)
const iterations = config.iterations || 2
const rtl = config.rtl ? 1 : 0
const o = getOptions('single', seed, config.overrides)
const o = getOptions('single', seed, config)
switch (config.type) {
case 'underline': {
@@ -183,7 +183,7 @@ export function renderAnnotation(
break
}
case 'circle': {
const doubleO = getOptions('double', seed, config.overrides)
const doubleO = getOptions('double', seed, config)
const width = rect.w + (padding[1] + padding[3])
const height = rect.h + (padding[0] + padding[2])
const x = rect.x - padding[3] + (width / 2)
@@ -199,7 +199,7 @@ export function renderAnnotation(
break
}
case 'highlight': {
const o = getOptions('highlight', seed, config.overrides)
const o = getOptions('highlight', seed, config)
strokeWidth = rect.h * 0.95
const y = rect.y + (rect.h / 2)
for (let i = rtl; i < iterations + rtl; i++) {