8
0
Просмотр исходного кода

Renamed `DELETE` and `INSERT` to lower case.

Oskar Wrobel 9 лет назад
Родитель
Сommit
4b1153232d
1 измененных файлов с 3 добавлено и 3 удалено
  1. 3 3
      packages/ckeditor5-typing/src/typing.js

+ 3 - 3
packages/ckeditor5-typing/src/typing.js

@@ -177,13 +177,13 @@ class MutationHandler {
 			const viewPos = new ViewPosition( mutation.node, change.index );
 			const modelPos = this.editing.mapper.toModelPosition( viewPos );
 
-			if ( change.type == 'INSERT' ) {
+			if ( change.type == 'insert' ) {
 				const insertedText = change.values.join( '' );
 
 				this._insert( modelPos, insertedText );
 
 				this.selectionPosition = ModelPosition.createAt( modelPos.parent, modelPos.offset + insertedText.length );
-			} else /* if ( change.type == 'DELETE' ) */ {
+			} else /* if ( change.type == 'delete' ) */ {
 				this._remove( new ModelRange( modelPos, modelPos.getShiftedBy( change.howMany ) ), change.howMany );
 
 				this.selectionPosition = modelPos;
@@ -205,7 +205,7 @@ class MutationHandler {
 		const diffResult = diff( mutation.oldChildren, mutation.newChildren, compare );
 		const changes = diffToChanges( diffResult, mutation.newChildren );
 
-		// In case of [ REMOVE, INSERT, INSERT ] the previous check will not exit.
+		// In case of [ delete, insert, insert ] the previous check will not exit.
 		if ( changes.length > 1 ) {
 			return;
 		}