Explorar o código

Sort methods order.

Piotr Jasiun %!s(int64=10) %!d(string=hai) anos
pai
achega
035ba72820
Modificáronse 1 ficheiros con 12 adicións e 12 borrados
  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.
 	 *