Fix primitive resize (#683)

* Fix primitive resize on load
Fixes #676

* Add test

* Add playwright test

* Update test expectations [skip ci]

---------

Co-authored-by: huchenlei <chenlei.hu@mail.utoronto.ca>
Co-authored-by: github-actions <github-actions@github.com>
This commit is contained in:
pythongosssss
2024-08-29 23:01:57 +01:00
committed by GitHub
parent e59ed85cc0
commit d0067719b8
5 changed files with 179 additions and 1 deletions

View File

@@ -622,5 +622,21 @@ describe('widget inputs', () => {
})
})
})
it('primitive maintains size on reload', async () => {
const { ez, graph } = await start()
const primitive = ez.PrimitiveNode()
const image = ez.EmptyImage()
image.widgets.width.convertToInput()
primitive.outputs[0].connectTo(image.inputs.width)
primitive.node.size = [999, 999]
await checkBeforeAndAfterReload(graph, async (r) => {
const { node } = graph.find(primitive)
expect(node.size[0]).toBe(999)
expect(node.size[1]).toBe(999)
})
})
})
})