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

Apply suggestions from code review.

Kuba Niegowski пре 5 година
родитељ
комит
bbedcfeebb
1 измењених фајлова са 3 додато и 4 уклоњено
  1. 3 4
      packages/ckeditor5-table/src/tablenavigation.js

+ 3 - 4
packages/ckeditor5-table/src/tablenavigation.js

@@ -203,7 +203,7 @@ export default class TableNavigation extends Plugin {
 		const cellRange = model.createRangeIn( tableCell );
 		const cellRange = model.createRangeIn( tableCell );
 
 
 		// Let's check if the selection is at the beginning/end of the cell.
 		// Let's check if the selection is at the beginning/end of the cell.
-		if ( this._isSelectionAtCellEdge( cellRange, selection, isForward ) ) {
+		if ( this._isSelectionAtCellEdge( selection, isForward ) ) {
 			this._navigateFromCellInDirection( tableCell, direction );
 			this._navigateFromCellInDirection( tableCell, direction );
 
 
 			return true;
 			return true;
@@ -250,15 +250,14 @@ export default class TableNavigation extends Plugin {
 	}
 	}
 
 
 	/**
 	/**
-	 * Returns `true` if `selection` is at `cellRange` edge according to navigation `direction`.
+	 * Returns true if the selection is at the boundary of a table cell according to the navigation direction.
 	 *
 	 *
 	 * @private
 	 * @private
-	 * @param {module:engine/model/range~Range} cellRange The bounding cell range.
 	 * @param {module:engine/model/selection~Selection} selection The current selection.
 	 * @param {module:engine/model/selection~Selection} selection The current selection.
 	 * @param {Boolean} isForward The expected navigation direction.
 	 * @param {Boolean} isForward The expected navigation direction.
 	 * @returns {Boolean}
 	 * @returns {Boolean}
 	 */
 	 */
-	_isSelectionAtCellEdge( cellRange, selection, isForward ) {
+	_isSelectionAtCellEdge( selection, isForward ) {
 		const model = this.editor.model;
 		const model = this.editor.model;
 		const schema = this.editor.model.schema;
 		const schema = this.editor.model.schema;