MCPcopy Create free account
hub / github.com/facebook/Rapid / setCheckpoint

Method setCheckpoint

modules/core/EditSystem.js:568–577  ·  view source on GitHub ↗

* setCheckpoint * This saves the `history` and `index` as a "checkpoint" that we can return to later. * If the given checkpointID exists, it will be overwritten. * @param {string} checkpointID - A string to identify the checkpoint

(checkpointID)

Source from the content-addressed store, hash-verified

566 * @param {string} checkpointID - A string to identify the checkpoint
567 */
568 setCheckpoint(checkpointID) {
569 if (!checkpointID) return;
570 d3_select(document).interrupt('editTransition'); // complete any transition already in progress
571
572 // Save a shallow copy of history, in case user undos away the edit that `_index` points to.
573 this._checkpoints.set(checkpointID, {
574 history: this._history.slice(), // shallow copy
575 index: this._index
576 });
577 }
578
579
580 /**

Callers 10

didNameRoadAsyncFunction · 0.80
hasPointAsyncFunction · 0.80
hasHouseAsyncFunction · 0.80
doneSquareAsyncFunction · 0.80
hasTankAsyncFunction · 0.80
_startIntroFunction · 0.80
enterMethod · 0.80
enterMethod · 0.80
EditSystem.test.jsFile · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected