@@ -109,7 +109,7 @@ class Document {
109
109
/*
110
110
Public: Modify the Document's text.
111
111
112
- The modification can be a deletion, insertion, or both.
112
+ The modification can be a deletion, insertion, or both (an overwrite) .
113
113
If `end` is after `start` in the document, the operation is a deletion.
114
114
If `text` is passed, the operation is an insertion.
115
115
@@ -176,6 +176,7 @@ class Document {
176
176
* `layerUpdatesById` {Object} of shape:
177
177
* {Number} Marker layer ID
178
178
* {Numer} Marker ID
179
+ * {Marker}
179
180
180
181
Returns an {Array} of the marker update operation.
181
182
*/
@@ -236,7 +237,9 @@ class Document {
236
237
}
237
238
238
239
/*
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.
240
243
241
244
Returns null or {Object} of shape:
242
245
* `markers` {Object} of shape:
@@ -279,7 +282,7 @@ class Document {
279
282
}
280
283
281
284
/*
282
- Public: Redoes one or more operations .
285
+ Public: Redoes the latest Transaction on the redo stack .
283
286
284
287
Returns null or {Object} of shape:
285
288
* `markers` {Object} of shape:
@@ -332,9 +335,13 @@ class Document {
332
335
}
333
336
334
337
/*
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.
336
342
337
343
* `groupingInterval` {Number} of milliseconds
344
+
338
345
*/
339
346
applyGroupingInterval ( groupingInterval ) {
340
347
const topEntry = this . undoStack [ this . undoStack . length - 1 ]
@@ -419,6 +426,9 @@ class Document {
419
426
/*
420
427
Public: Reverts the document to a checkpoint in the undo stack.
421
428
429
+ If a barrier exists in the undo stack before the checkpoint matching
430
+ `checkpointId`, the reversion fails.
431
+
422
432
* `checkpointId` {Number}
423
433
* `options` {Object} of shape:
424
434
* `deleteCheckpoint` {Bool}
@@ -791,7 +801,6 @@ class Document {
791
801
792
802
Returns {Object} of shape:
793
803
* `markerUpdates` {Object} of shape:
794
- // TODO confirm site ID here
795
804
* {Number} Site ID
796
805
* {Number} Marker layer ID
797
806
* {Number} Marker ID
0 commit comments