Skip to content

AI-native design editor. Open-source Figma alternative.

chore(scripts): compare bisect subsets by bounds

Danila Poyarkov61ada46f2435
diff --git a/scripts/visual-bisect.ts b/scripts/visual-bisect.ts
index f6d941637..476e27b91 100644
--- a/scripts/visual-bisect.ts
+++ b/scripts/visual-bisect.ts
@@ -167,11 +167,15 @@ async function exportOpenPencilSubset(indices: number[], path: string): Promise<
}
try {
- const data = await headlessRenderNodes(graph, page.id, page.childIds, {
- scale,
- format: 'PNG',
- trimTransparent: true
- })
+ const data = await headlessRenderNodes(
+ graph,
+ page.id,
+ indices.map((index) => childIds[index]),
+ {
+ scale,
+ format: 'PNG'
+ }
+ )
if (!data) throw new Error(`OpenPencil render produced no image for ${indices.join(',')}`)
await Bun.write(path, data)
} finally {