浏览代码

Make core.treeModel.Position and core.treeModel.Range transformation methods protected.

Szymon Cofalik 9 年之前
父节点
当前提交
6ffecf542c

+ 3 - 0
packages/ckeditor5-engine/src/treemodel/position.js

@@ -188,6 +188,7 @@ export default class Position {
 	 * Returns this position after being updated by removing `howMany` nodes starting from `deletePosition`.
 	 * Returns this position after being updated by removing `howMany` nodes starting from `deletePosition`.
 	 * It may happen that this position is in a removed node. If that is the case, `null` is returned instead.
 	 * It may happen that this position is in a removed node. If that is the case, `null` is returned instead.
 	 *
 	 *
+	 * @protected
 	 * @param {core.treeModel.Position} deletePosition Position before the first removed node.
 	 * @param {core.treeModel.Position} deletePosition Position before the first removed node.
 	 * @param {Number} howMany How many nodes are removed.
 	 * @param {Number} howMany How many nodes are removed.
 	 * @returns {core.treeModel.Position|null} Transformed position or `null`.
 	 * @returns {core.treeModel.Position|null} Transformed position or `null`.
@@ -235,6 +236,7 @@ export default class Position {
 	/**
 	/**
 	 * Returns this position after being updated by inserting `howMany` nodes at `insertPosition`.
 	 * Returns this position after being updated by inserting `howMany` nodes at `insertPosition`.
 	 *
 	 *
+	 * @protected
 	 * @param {core.treeModel.Position} insertPosition Position where nodes are inserted.
 	 * @param {core.treeModel.Position} insertPosition Position where nodes are inserted.
 	 * @param {Number} howMany How many nodes are inserted.
 	 * @param {Number} howMany How many nodes are inserted.
 	 * @param {Boolean} insertBefore Flag indicating whether nodes are inserted before or after `insertPosition`.
 	 * @param {Boolean} insertBefore Flag indicating whether nodes are inserted before or after `insertPosition`.
@@ -274,6 +276,7 @@ export default class Position {
 	/**
 	/**
 	 * Returns this position after being updated by moving `howMany` nodes from `sourcePosition` to `targetPosition`.
 	 * Returns this position after being updated by moving `howMany` nodes from `sourcePosition` to `targetPosition`.
 	 *
 	 *
+	 * @protected
 	 * @param {core.treeModel.Position} sourcePosition Position before the first element to move.
 	 * @param {core.treeModel.Position} sourcePosition Position before the first element to move.
 	 * @param {core.treeModel.Position} targetPosition Position where moved elements will be inserted.
 	 * @param {core.treeModel.Position} targetPosition Position where moved elements will be inserted.
 	 * @param {Number} howMany How many consecutive nodes to move, starting from `sourcePosition`.
 	 * @param {Number} howMany How many consecutive nodes to move, starting from `sourcePosition`.

+ 1 - 0
packages/ckeditor5-engine/src/treemodel/range.js

@@ -360,6 +360,7 @@ export default class Range {
 	 *		transformed = range.getTransformedByInsertion( new Position( root, [ 4, 0, 1 ] ), 4, false, true );
 	 *		transformed = range.getTransformedByInsertion( new Position( root, [ 4, 0, 1 ] ), 4, false, true );
 	 *		// transformed array has one range: from [ 2, 7 ] to [ 4, 0, 5 ] because range was expanded
 	 *		// transformed array has one range: from [ 2, 7 ] to [ 4, 0, 5 ] because range was expanded
 	 *
 	 *
+	 * @protected
 	 * @param {core.treeModel.Position} insertPosition Position where nodes are inserted.
 	 * @param {core.treeModel.Position} insertPosition Position where nodes are inserted.
 	 * @param {Number} howMany How many nodes are inserted.
 	 * @param {Number} howMany How many nodes are inserted.
 	 * @param {Boolean} [spread] Flag indicating whether this {core.treeModel.Range range} should be spread if insertion
 	 * @param {Boolean} [spread] Flag indicating whether this {core.treeModel.Range range} should be spread if insertion