8
0
فهرست منبع

API docs fixes.

Piotrek Koszuliński 9 سال پیش
والد
کامیت
e7cd65b0b3

+ 7 - 7
packages/ckeditor5-engine/src/model/batch.js

@@ -35,11 +35,11 @@ export default class Batch {
 	 * Creates Batch instance. Not recommended to use directly, use {@link engine.model.Document#batch} instead.
 	 *
 	 * @param {engine.model.Document} doc Document which this Batch changes.
-	 * @param {'ignore'|'undo'|'redo'|'default'} type Type of batch. Defaults to `'default'`.
+	 * @param {'ignore'|'undo'|'redo'|'default'} type Type of the batch. Defaults to `'default'`.
 	 */
 	constructor( doc, type = 'default' ) {
 		/**
-		 * Document which this Batch changes.
+		 * Document which this batch changes.
 		 *
 		 * @readonly
 		 * @member {engine.model.Document} engine.model.Batch#doc
@@ -47,7 +47,7 @@ export default class Batch {
 		this.doc = doc;
 
 		/**
-		 * Array of deltas which compose Batch.
+		 * Array of deltas which compose this batch.
 		 *
 		 * @readonly
 		 * @member {Array.<engine.model.delta.Delta>} engine.model.Batch#deltas
@@ -55,7 +55,7 @@ export default class Batch {
 		this.deltas = [];
 
 		/**
-		 * Type of batch.
+		 * Type of the batch.
 		 *
 		 * Can be one of the following values:
 		 * * `'default'` - all "normal" batches. Most commonly used type.
@@ -71,7 +71,7 @@ export default class Batch {
 
 	/**
 	 * Returns this batch base version, which is equal to the base version of first delta in the batch.
-	 * If there are no deltas in the batch, returns null.
+	 * If there are no deltas in the batch, it returns `null`.
 	 *
 	 * @readonly
 	 * @type {Number|null}
@@ -81,7 +81,7 @@ export default class Batch {
 	}
 
 	/**
-	 * Adds delta to the Batch instance. All modification methods (insert, remove, split, etc.) use this method
+	 * Adds delta to the batch instance. All modification methods (insert, remove, split, etc.) use this method
 	 * to add created deltas.
 	 *
 	 * @param {engine.model.delta.Delta} delta Delta to add.
@@ -107,7 +107,7 @@ export default class Batch {
 }
 
 /**
- * Function to register Batch methods. To make code scalable Batch do not have modification
+ * Function to register batch methods. To make code scalable Batch do not have modification
  * methods built in. They can be registered using this method.
  *
  * This method checks if there is no naming collision and throws `batch-register-taken` if the method name

+ 5 - 4
packages/ckeditor5-engine/src/model/compressedhistory.js

@@ -14,7 +14,7 @@ import History from './history.js';
  *
  * **Note:** deltas kept in `CompressedHistory` should be used only to transform deltas. Do not use `CompressedHistory` to get original
  * delta (especially basing on its {@link engine.model.delta.Delta#baseVersion baseVersion}). Do not trust base versions of deltas
- * returned by `CompressedHistory`. After transforming your delta by deltas from `CompressedHistory`, fix it's base version accordingly.
+ * returned by `CompressedHistory`. After transforming your delta by deltas from `CompressedHistory`, fix its base version accordingly.
  *
  * @see engine.model.History
  * @memberOf engine.model
@@ -25,6 +25,7 @@ export default class CompressedHistory extends History {
 
 		/**
 		 * Stores base versions of deltas which has been marked as inactive.
+		 *
 		 * @private
 		 * @member {Array.<Number>} engine.model.CompressedHistory#_inactiveBaseVersions
 		 */
@@ -120,8 +121,8 @@ export default class CompressedHistory extends History {
 	/**
 	 * Returns base versions of deltas which has been marked as reversed, in given base versions range.
 	 *
-	 * @param {Number} from Start of base versions range to check.
-	 * @param {Number} to End of base versions range to check.
+	 * @param {Number} [from=0] Start of base versions range to check.
+	 * @param {Number} [to=Number.POSITIVE_INFINITY] End of base versions range to check.
 	 * @returns {Iterator.<Number>} Base versions of deltas marked as reversed.
 	 */
 	*getInactiveBaseVersions( from = 0, to = Number.POSITIVE_INFINITY ) {
@@ -135,9 +136,9 @@ export default class CompressedHistory extends History {
 	/**
 	 * Updates {@link engine.model.History#_historyPoints} structure.
 	 *
+	 * @private
 	 * @param {Number} baseVersion Base version of delta after which history points should be updated.
 	 * @param {Number} changeBy By how much change history points. Can be a negative value.
-	 * @private
 	 */
 	_updateHistoryPointsAfter( baseVersion, changeBy ) {
 		for ( let key of this._historyPoints.keys() ) {

+ 4 - 4
packages/ckeditor5-engine/src/model/history.js

@@ -55,10 +55,10 @@ export default class History {
 	/**
 	 * Returns deltas added to the history.
 	 *
-	 * @param {Number} from Base version from which deltas should be returned (inclusive). Defaults to `0` which means
+	 * @param {Number} [from=0] Base version from which deltas should be returned (inclusive). Defaults to `0` which means
 	 * that deltas from the first one will be returned.
-	 * @param {Number} to Base version up to which deltas should be returned (exclusive). Defaults to `Number.POSITIVE_INFINITY`
-	 * which means that deltas up to the last one will be returned.
+	 * @param {Number} [to=Number.POSITIVE_INFINITY] Base version up to which deltas should be returned (exclusive).
+	 * Defaults to `Number.POSITIVE_INFINITY` which means that deltas up to the last one will be returned.
 	 * @returns {Iterator.<engine.model.delta.Delta>} Deltas added to the history.
 	 */
 	*getDeltas( from = 0, to = Number.POSITIVE_INFINITY ) {
@@ -102,8 +102,8 @@ export default class History {
 	/**
 	 * Gets an index in {@link engine.model.History#_deltas} where delta with given `baseVersion` is added.
 	 *
-	 * @param {Number} baseVersion Base version of delta.
 	 * @private
+	 * @param {Number} baseVersion Base version of delta.
 	 */
 	_getIndex( baseVersion ) {
 		let index = this._historyPoints.get( baseVersion );