跳转到内容

speculateProjectChange

此内容尚不支持你的语言。

speculateProjectChange(project, callback): SpeculativeProjectChange

Defined in: transaction/src/transaction.ts:384

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