ソースを参照

Sort methods order.

Piotr Jasiun 10 年 前
コミット
035ba72820
1 ファイル変更12 行追加12 行削除
  1. 12 12
      packages/ckeditor5-engine/src/treecontroller/mapper.js

+ 12 - 12
packages/ckeditor5-engine/src/treecontroller/mapper.js

@@ -91,6 +91,18 @@ export default class Mapper {
 		return ModelPosition.createFromParentAndOffset( modelParent, modelOffset );
 	}
 
+	/**
+	 * Get corresponding view position.
+	 *
+	 * @param {treeModel.Position} modelPosition Model position.
+	 * @returns {treeView.Position} Corresponding view position.
+	 */
+	toViewPosition( modelPosition ) {
+		let viewContainer = this._modelToViewMapping.get( modelPosition.parent );
+
+		return this._findPositionIn( viewContainer, modelPosition.offset );
+	}
+
 	/**
 	 * Calculates model offset base on the view position and the block element.
 	 *
@@ -169,18 +181,6 @@ export default class Mapper {
 		}
 	}
 
-	/**
-	 * Get corresponding view position.
-	 *
-	 * @param {treeModel.Position} modelPosition Model position.
-	 * @returns {treeView.Position} Corresponding view position.
-	 */
-	toViewPosition( modelPosition ) {
-		let viewContainer = this._modelToViewMapping.get( modelPosition.parent );
-
-		return this._findPositionIn( viewContainer, modelPosition.offset );
-	}
-
 	/**
 	 * Finds the position in the view node (or its children) with the expected model offset.
 	 *