Skip to content

speculateProjectChange

speculateProjectChange(project, callback): SpeculativeProjectChange

Defined in: packages/transaction/dist/transaction.d.ts:48

Applies a transaction to a Project snapshot without committing it.

The result is a detached Project that never reaches the engine: no revision, no history entry, no change notification. It exists so an interaction can be shown before it is decided — a drag can render the layout it is proposing while the committed Project stays exactly as the user left it, and abandoning the gesture costs nothing because there is nothing to undo.

The draft shares every untouched subtree with project, so speculating once per pointer move is cheap enough to do at frame rate.

Readonly<AelionProject>

(transaction) => void

SpeculativeProjectChange