@@ -109,7 +109,7 @@ class Document {
109109 /*
110110 Public: Modify the Document's text.
111111
112- The modification can be a deletion, insertion, or both.
112+ The modification can be a deletion, insertion, or both (an overwrite) .
113113 If `end` is after `start` in the document, the operation is a deletion.
114114 If `text` is passed, the operation is an insertion.
115115
@@ -176,6 +176,7 @@ class Document {
176176 * `layerUpdatesById` {Object} of shape:
177177 * {Number} Marker layer ID
178178 * {Numer} Marker ID
179+ * {Marker}
179180
180181 Returns an {Array} of the marker update operation.
181182 */
@@ -236,7 +237,9 @@ class Document {
236237 }
237238
238239 /*
239- Public: Undoes one or more operations.
240+ Public: Undoes the latest Transaction on the undo stack.
241+
242+ If there's a barrier before the latest Transaction, nothing happens.
240243
241244 Returns null or {Object} of shape:
242245 * `markers` {Object} of shape:
@@ -279,7 +282,7 @@ class Document {
279282 }
280283
281284 /*
282- Public: Redoes one or more operations .
285+ Public: Redoes the latest Transaction on the redo stack .
283286
284287 Returns null or {Object} of shape:
285288 * `markers` {Object} of shape:
@@ -332,9 +335,13 @@ class Document {
332335 }
333336
334337 /*
335- Public: Sets the interval for grouping transactions.
338+ Public: Sets the interval for grouping Transactions.
339+
340+ If the updates grouping interval would contain the two latest transactions,
341+ they are grouped.
336342
337343 * `groupingInterval` {Number} of milliseconds
344+
338345 */
339346 applyGroupingInterval ( groupingInterval ) {
340347 const topEntry = this . undoStack [ this . undoStack . length - 1 ]
@@ -419,6 +426,9 @@ class Document {
419426 /*
420427 Public: Reverts the document to a checkpoint in the undo stack.
421428
429+ If a barrier exists in the undo stack before the checkpoint matching
430+ `checkpointId`, the reversion fails.
431+
422432 * `checkpointId` {Number}
423433 * `options` {Object} of shape:
424434 * `deleteCheckpoint` {Bool}
@@ -791,7 +801,6 @@ class Document {
791801
792802 Returns {Object} of shape:
793803 * `markerUpdates` {Object} of shape:
794- // TODO confirm site ID here
795804 * {Number} Site ID
796805 * {Number} Marker layer ID
797806 * {Number} Marker ID
0 commit comments