浏览代码

Docs: Fixed inherited methods documentation. Closes #971.

Piotrek Koszuliński 8 年之前
父节点
当前提交
5be4a494fb

+ 5 - 3
packages/ckeditor5-engine/src/model/operation/attributeoperation.js

@@ -89,15 +89,17 @@ export default class AttributeOperation extends Operation {
 	}
 
 	/**
-	 * @inheritDoc
-	 * @returns {module:engine/model/operation/attributeoperation~AttributeOperation}
+	 * Creates and returns an operation that has the same parameters as this operation.
+	 *
+	 * @returns {module:engine/model/operation/attributeoperation~AttributeOperation} Clone of this operation.
 	 */
 	clone() {
 		return new AttributeOperation( this.range, this.key, this.oldValue, this.newValue, this.baseVersion );
 	}
 
 	/**
-	 * @inheritDoc
+	 * See {@link module:engine/model/operation/operation~Operation#getReversed `Operation#getReversed()`}.
+	 *
 	 * @returns {module:engine/model/operation/attributeoperation~AttributeOperation}
 	 */
 	getReversed() {

+ 5 - 3
packages/ckeditor5-engine/src/model/operation/insertoperation.js

@@ -56,8 +56,9 @@ export default class InsertOperation extends Operation {
 	}
 
 	/**
-	 * @inheritDoc
-	 * @returns {module:engine/model/operation/insertoperation~InsertOperation}
+	 * Creates and returns an operation that has the same parameters as this operation.
+	 *
+	 * @returns {module:engine/model/operation/insertoperation~InsertOperation} Clone of this operation.
 	 */
 	clone() {
 		const nodes = new NodeList( [ ...this.nodes ].map( node => node.clone( true ) ) );
@@ -66,7 +67,8 @@ export default class InsertOperation extends Operation {
 	}
 
 	/**
-	 * @inheritDoc
+	 * See {@link module:engine/model/operation/operation~Operation#getReversed `Operation#getReversed()`}.
+	 *
 	 * @returns {module:engine/model/operation/removeoperation~RemoveOperation}
 	 */
 	getReversed() {

+ 5 - 3
packages/ckeditor5-engine/src/model/operation/markeroperation.js

@@ -65,15 +65,17 @@ export default class MarkerOperation extends Operation {
 	}
 
 	/**
-	 * @inheritDoc
-	 * @returns {module:engine/model/operation/markeroperation~MarkerOperation}
+	 * Creates and returns an operation that has the same parameters as this operation.
+	 *
+	 * @returns {module:engine/model/operation/markeroperation~MarkerOperation} Clone of this operation.
 	 */
 	clone() {
 		return new MarkerOperation( this.name, this.oldRange, this.newRange, this._markers, this.baseVersion );
 	}
 
 	/**
-	 * @inheritDoc
+	 * See {@link module:engine/model/operation/operation~Operation#getReversed `Operation#getReversed()`}.
+	 *
 	 * @returns {module:engine/model/operation/markeroperation~MarkerOperation}
 	 */
 	getReversed() {

+ 7 - 3
packages/ckeditor5-engine/src/model/operation/moveoperation.js

@@ -17,6 +17,8 @@ import writer from './../writer';
 /**
  * Operation to move a range of {@link module:engine/model/item~Item model items}
  * to given {@link module:engine/model/position~Position target position}.
+ *
+ * @extends module:engine/model/operation/operation~Operation
  */
 export default class MoveOperation extends Operation {
 	/**
@@ -72,8 +74,9 @@ export default class MoveOperation extends Operation {
 	}
 
 	/**
-	 * @inheritDoc
-	 * @returns {module:engine/model/operation/moveoperation~MoveOperation}
+	 * Creates and returns an operation that has the same parameters as this operation.
+	 *
+	 * @returns {module:engine/model/operation/moveoperation~MoveOperation} Clone of this operation.
 	 */
 	clone() {
 		const op = new this.constructor( this.sourcePosition, this.howMany, this.targetPosition, this.baseVersion );
@@ -101,7 +104,8 @@ export default class MoveOperation extends Operation {
 	}
 
 	/**
-	 * @inheritDoc
+	 * See {@link module:engine/model/operation/operation~Operation#getReversed `Operation#getReversed()`}.
+	 *
 	 * @returns {module:engine/model/operation/moveoperation~MoveOperation}
 	 */
 	getReversed() {

+ 5 - 3
packages/ckeditor5-engine/src/model/operation/nooperation.js

@@ -21,15 +21,17 @@ import Operation from './operation';
  */
 export default class NoOperation extends Operation {
 	/**
-	 * @inheritDoc
-	 * @returns {module:engine/model/operation/nooperation~NoOperation}
+	 * Creates and returns an operation that has the same parameters as this operation.
+	 *
+	 * @returns {module:engine/model/operation/nooperation~NoOperation} Clone of this operation.
 	 */
 	clone() {
 		return new NoOperation( this.baseVersion );
 	}
 
 	/**
-	 * @inheritDoc
+	 * See {@link module:engine/model/operation/operation~Operation#getReversed `Operation#getReversed()`}.
+	 *
 	 * @returns {module:engine/model/operation/nooperation~NoOperation}
 	 */
 	getReversed() {

+ 2 - 1
packages/ckeditor5-engine/src/model/operation/reinsertoperation.js

@@ -41,7 +41,8 @@ export default class ReinsertOperation extends MoveOperation {
 	}
 
 	/**
-	 * @inheritDoc
+	 * See {@link module:engine/model/operation/operation~Operation#getReversed `Operation#getReversed()`}.
+	 *
 	 * @returns {module:engine/model/operation/removeoperation~RemoveOperation}
 	 */
 	getReversed() {

+ 5 - 3
packages/ckeditor5-engine/src/model/operation/removeoperation.js

@@ -79,7 +79,8 @@ export default class RemoveOperation extends MoveOperation {
 	}
 
 	/**
-	 * @inheritDoc
+	 * See {@link module:engine/model/operation/operation~Operation#getReversed `Operation#getReversed()`}.
+	 *
 	 * @returns {module:engine/model/operation/reinsertoperation~ReinsertOperation}
 	 */
 	getReversed() {
@@ -87,8 +88,9 @@ export default class RemoveOperation extends MoveOperation {
 	}
 
 	/**
-	 * @inheritDoc
-	 * @returns {module:engine/model/operation/removeoperation~RemoveOperation}
+	 * Creates and returns an operation that has the same parameters as this operation.
+	 *
+	 * @returns {module:engine/model/operation/removeoperation~RemoveOperation} Clone of this operation.
 	 */
 	clone() {
 		const removeOperation = new RemoveOperation( this.sourcePosition, this.howMany, this.baseVersion );

+ 5 - 3
packages/ckeditor5-engine/src/model/operation/renameoperation.js

@@ -61,15 +61,17 @@ export default class RenameOperation extends Operation {
 	}
 
 	/**
-	 * @inheritDoc
-	 * @returns {module:engine/model/operation/renameoperation~RenameOperation}
+	 * Creates and returns an operation that has the same parameters as this operation.
+	 *
+	 * @returns {module:engine/model/operation/renameoperation~RenameOperation} Clone of this operation.
 	 */
 	clone() {
 		return new RenameOperation( Position.createFromPosition( this.position ), this.oldName, this.newName, this.baseVersion );
 	}
 
 	/**
-	 * @inheritDoc
+	 * See {@link module:engine/model/operation/operation~Operation#getReversed `Operation#getReversed()`}.
+	 *
 	 * @returns {module:engine/model/operation/renameoperation~RenameOperation}
 	 */
 	getReversed() {

+ 5 - 1
packages/ckeditor5-engine/src/model/operation/rootattributeoperation.js

@@ -80,13 +80,17 @@ export default class RootAttributeOperation extends Operation {
 	}
 
 	/**
-	 * @returns {module:engine/model/operation/rootattributeoperation~RootAttributeOperation}
+	 * Creates and returns an operation that has the same parameters as this operation.
+	 *
+	 * @returns {module:engine/model/operation/rootattributeoperation~RootAttributeOperation} Clone of this operation.
 	 */
 	clone() {
 		return new RootAttributeOperation( this.root, this.key, this.oldValue, this.newValue, this.baseVersion );
 	}
 
 	/**
+	 * See {@link module:engine/model/operation/operation~Operation#getReversed `Operation#getReversed()`}.
+	 *
 	 * @returns {module:engine/model/operation/rootattributeoperation~RootAttributeOperation}
 	 */
 	getReversed() {