ソースを参照

Internal: Renamed cursorPosition to modelCursor.

Oskar Wróbel 8 年 前
コミット
c2b85cf62d
1 ファイル変更6 行追加6 行削除
  1. 6 6
      packages/ckeditor5-paragraph/src/paragraph.js

+ 6 - 6
packages/ckeditor5-paragraph/src/paragraph.js

@@ -75,7 +75,7 @@ export default class Paragraph extends Plugin {
 				// Find allowed parent for paragraph that we are going to insert.
 				// If current parent does not allow to insert paragraph but one of the ancestors does
 				// then split nodes to allowed parent.
-				const splitResult = conversionApi.splitToAllowedParent( paragraph, data.cursorPosition );
+				const splitResult = conversionApi.splitToAllowedParent( paragraph, data.modelCursor );
 
 				// When there is no split result it means that we can't insert paragraph in this position.
 				if ( !splitResult ) {
@@ -92,11 +92,11 @@ export default class Paragraph extends Plugin {
 				// This is because we want to keep siblings inside the same paragraph as long as it is possible.
 				// When next node won't be allowed in a paragraph it will split this paragraph anyway.
 				data.modelRange = new Range( Position.createBefore( paragraph ), modelRange.end );
-				data.cursorPosition = data.modelRange.end;
+				data.modelCursor = data.modelRange.end;
 
 			// When element is not paragraph-like lets try to wrap it by a paragraph.
-			} else if ( isParagraphable( data.viewItem, data.cursorPosition, conversionApi.schema ) ) {
-				data = Object.assign( data, wrapInParagraph( data.viewItem, data.cursorPosition, conversionApi ) );
+			} else if ( isParagraphable( data.viewItem, data.modelCursor, conversionApi.schema ) ) {
+				data = Object.assign( data, wrapInParagraph( data.viewItem, data.modelCursor, conversionApi ) );
 			}
 		}, { priority: 'low' } );
 
@@ -107,8 +107,8 @@ export default class Paragraph extends Plugin {
 				return;
 			}
 
-			if ( isParagraphable( data.viewItem, data.cursorPosition, conversionApi.schema ) ) {
-				data = Object.assign( data, wrapInParagraph( data.viewItem, data.cursorPosition, conversionApi ) );
+			if ( isParagraphable( data.viewItem, data.modelCursor, conversionApi.schema ) ) {
+				data = Object.assign( data, wrapInParagraph( data.viewItem, data.modelCursor, conversionApi ) );
 			}
 		}, { priority: 'lowest' } );