Преглед изворни кода

Minor API docs corrections.

Anna Tomanek пре 9 година
родитељ
комит
8a070f358b

+ 2 - 2
packages/ckeditor5-undo/src/redocommand.js

@@ -8,10 +8,10 @@ import { transformDelta as transformDelta } from './basecommand.js';
 
 /**
  * The redo command stores {@link engine.model.Batch batches} that were used to undo a batch by {@link undo.UndoCommand UndoCommand}.
- * It is able to redo a previously undone batch by reversing the undoing batches created by `UndoCommand`. A reversed batch is
+ * It is able to redo a previously undone batch by reversing the undoing batches created by `UndoCommand`. The reversed batch is
  * also transformed by batches from {@link engine.model.Document#history history} that happened after it and are not other redo batches.
  *
- * The redo command also takes care of restoring the {@link engine.model.Document#selection selection} to the state before
+ * The redo command also takes care of restoring the {@link engine.model.Document#selection document selection} to the state before
  * an undone batch was applied.
  *
  * @memberOf undo

+ 6 - 6
packages/ckeditor5-undo/src/undo.js

@@ -12,14 +12,14 @@ import ButtonView from '../ui/button/buttonview.js';
 /**
  * The undo feature. It introduces the Undo and Redo buttons to the editor.
  *
- * Below is the explanation of the undo mechanism working together with {@link engine.model.CompressedHistory CompressedHistory}:
+ * Below is the explanation of the undo mechanism working together with {@link engine.model.History History}:
  *
  * Whenever a {@link engine.model.Delta delta} is applied to the {@link engine.model.Document document}, it is saved to
- * `CompressedHistory` as is. The {@link engine.model.Batch batch} that owns that delta is also saved, in {@link undo.UndoCommand},
+ * `History` as is. The {@link engine.model.Batch batch} that owns that delta is also saved, in {@link undo.UndoCommand},
  * together with the selection that was present in the document before the delta was applied. A batch is saved instead of the delta
  * because changes are undone batch-by-batch, not delta-by-delta and a batch is seen as one undo step.
  *
- * After some changes happen to the document, the `CompressedHistory` and `UndoCommand` stack can be represented as follows:
+ * After some changes happen to the document, the `History` and `UndoCommand` stack can be represented as follows:
  *
  *		  History                           Undo stack
  *		===========             ==================================
@@ -60,7 +60,7 @@ import ButtonView from '../ui/button/buttonview.js';
  * operational transformation algorithms assume there is no connection between two transformed operations when resolving
  * conflicts, which is true for example for collaborative editing, but is not true for the undo algorithm.
  *
- * To prevent both problems, `CompressedHistory` introduces an API to {@link engine.model.CompressedDelta#removeDelta remove}
+ * To prevent both problems, `History` introduces an API to {@link engine.model.History#removeDelta remove}
  * deltas from history. It is used to remove undone and undoing deltas after they are applied. It feels right — since when a
  * delta is undone or reversed, it is "removed" and there should be no sign of it in the history (fig. 1).
  *
@@ -94,11 +94,11 @@ import ButtonView from '../ui/button/buttonview.js';
  * It is an obvious error — transforming by that delta would lead to incorrect results or "repeating" history would
  * produce a different document than the actual one.
  *
- * To prevent this situation, `B3` needs to also be {@link engine.model.CompressedHistory#updateDelta updated} in history.
+ * To prevent this situation, `B3` needs to also be {@link engine.model.History#updateDelta updated} in history.
  * It should be kept in a state that "does not remember" deltas that were removed from history. It is easily
  * achieved while transforming the reversed delta. For example, when `C2r` is transformed by `B3`, at the same time `B3` is
  * transformed by `C2r`. Transforming `B3` that remembers `C2` by a delta reversing `C2` effectively makes `B3` "forget" about `C2`.
- * By doing these transformation you effectively make `B3` base on `B2` which is the correct state of history (fig. 4).
+ * By doing these transformations you effectively make `B3` base on `B2` which is the correct state of history (fig. 4).
  *
  *		     History (fig. 4)                         History (fig. 5)
  *		===========================            ===============================

+ 2 - 2
packages/ckeditor5-undo/src/undocommand.js

@@ -11,8 +11,8 @@ import { transformDelta, transformRangesByDeltas } from './basecommand.js';
  * and is able to undo a batch by reversing it and transforming by other batches from {@link engine.model.Document#history history}
  * that happened after the reversed batch.
  *
- * The undo command also takes care of restoring the {@link engine.model.Document#selection selection} to the state before the
- * undone batch was applied.
+ * The undo command also takes care of restoring the {@link engine.model.Document#selection document selection} to the state before
+ * the undone batch was applied.
  *
  * @memberOf undo
  * @extends undo.BaseCommand