Quick answer: Construct 3 Canvas plugin’s SnapshotCanvas returning blank or undefined after a layout resize? The canvas was reallocated and the snapshot ran before the new content rendered.
A screenshot feature returns an empty image after the user resizes the window. SnapshotCanvas captured a stale or zero-sized canvas.
Wait One Tick
After resize, wait one tick before snapshotting. The renderer recreates the canvas on the size change — capturing in the same tick captures the old one.
Snapshot After Draw
Use On end of layout draw → SnapshotCanvas, not arbitrary triggers. Guarantees a complete frame.
Async Action
Mark the snapshot action chain with the wait for previous action to complete pattern so the next step (e.g. upload) has the data.
Verifying
Resize then snapshot — the resulting image matches the post-resize layout.
“Snapshot after end-of-layout-draw. Resize tears down the canvas mid-tick.”
If the user can resize at any moment, debounce the snapshot trigger by 100ms after the last resize event — gives the renderer time to settle.