chore(scripts): trim text-only bisect exports
This commit is contained in:
parent
51e961fc47
commit
977ccacf41
|
|
@ -176,15 +176,12 @@ async function exportOpenPencilSubset(indices: number[], path: string): Promise<
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const data = await headlessRenderNodes(
|
const nodeIds = indices.map((index) => childIds[index])
|
||||||
graph,
|
const data = await headlessRenderNodes(graph, page.id, nodeIds, {
|
||||||
page.id,
|
|
||||||
indices.map((index) => childIds[index]),
|
|
||||||
{
|
|
||||||
scale,
|
scale,
|
||||||
format: 'PNG'
|
format: 'PNG',
|
||||||
}
|
trimTransparent: nodeIds.every((id) => graph.getNode(id)?.type === 'TEXT')
|
||||||
)
|
})
|
||||||
if (!data) throw new Error(`OpenPencil render produced no image for ${indices.join(',')}`)
|
if (!data) throw new Error(`OpenPencil render produced no image for ${indices.join(',')}`)
|
||||||
await Bun.write(path, data)
|
await Bun.write(path, data)
|
||||||
} finally {
|
} finally {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue