Browse Source

Class typing.Typing has been renamed to typing.Input.

Kamil Piechaczek 9 years ago
parent
commit
6f3f23bbcf
2 changed files with 14 additions and 14 deletions
  1. 7 7
      packages/ckeditor5-typing/src/typing.js
  2. 7 7
      packages/ckeditor5-typing/tests/typing.js

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

@@ -19,7 +19,7 @@ import { getCode } from '../utils/keyboard.js';
  * @memberOf typing
  * @extends ckeditor5.Feature
  */
-export default class Typing extends Feature {
+export default class Input extends Feature {
 	/**
 	 * @inheritDoc
 	 */
@@ -31,7 +31,7 @@ export default class Typing extends Feature {
 		 * Typing's change buffer used to group subsequent changes into batches.
 		 *
 		 * @protected
-		 * @member {typing.ChangeBuffer} typing.Typing#_buffer
+		 * @member {typing.ChangeBuffer} typing.Input#_buffer
 		 */
 		this._buffer = new ChangeBuffer( editor.document, editor.config.get( 'typing.undoStep' ) || 20 );
 
@@ -100,7 +100,7 @@ export default class Typing extends Feature {
  * Helper class for translating DOM mutations into model changes.
  *
  * @private
- * @member typing.typing
+ * @member typing.Input
  */
 class MutationHandler {
 	/**
@@ -113,14 +113,14 @@ class MutationHandler {
 		/**
 		 * The editing controller.
 		 *
-		 * @member {engine.EditingController} typing.typing.MutationHandler#editing
+		 * @member {engine.EditingController} typing.Input.MutationHandler#editing
 		 */
 		this.editing = editing;
 
 		/**
 		 * The change buffer.
 		 *
-		 * @member {engine.EditingController} typing.typing.MutationHandler#buffer
+		 * @member {engine.EditingController} typing.Input.MutationHandler#buffer
 		 */
 		this.buffer = buffer;
 
@@ -128,7 +128,7 @@ class MutationHandler {
 		 * Number of inserted characters which need to be feed to the {@link #buffer change buffer}
 		 * on {@link #commit}.
 		 *
-		 * @member {Number} typing.typing.MutationHandler#insertedCharacterCount
+		 * @member {Number} typing.Input.MutationHandler#insertedCharacterCount
 		 */
 		this.insertedCharacterCount = 0;
 
@@ -140,7 +140,7 @@ class MutationHandler {
 		 * for ones like autocorrection or spellchecking. The caret should be placed after the whole piece
 		 * which was corrected (e.g. a word), not after the letter that was replaced.
 		 *
-		 * @member {engine.model.Position} typing.typing.MutationHandler#selectionPosition
+		 * @member {engine.model.Position} typing.Input.MutationHandler#selectionPosition
 		 */
 	}
 

+ 7 - 7
packages/ckeditor5-typing/tests/typing.js

@@ -4,7 +4,7 @@
  */
 
 import VirtualTestEditor from '/tests/ckeditor5/_utils/virtualtesteditor.js';
-import Typing from '/ckeditor5/typing/typing.js';
+import Input from '/ckeditor5/typing/input.js';
 import Paragraph from '/ckeditor5/paragraph/paragraph.js';
 
 import ModelRange from '/ckeditor5/engine/model/range.js';
@@ -20,14 +20,14 @@ import { getCode } from '/ckeditor5/utils/keyboard.js';
 import { getData as getModelData } from '/tests/engine/_utils/model.js';
 import { getData as getViewData } from '/tests/engine/_utils/view.js';
 
-describe( 'Typing feature', () => {
+describe( 'Input feature', () => {
 	let editor, model, modelRoot, view, viewRoot, listenter;
 
 	before( () => {
 		listenter = Object.create( EmitterMixin );
 
 		return VirtualTestEditor.create( {
-				features: [ Typing, Paragraph ]
+				features: [ Input, Paragraph ]
 			} )
 			.then( newEditor => {
 				// Mock image feature.
@@ -63,18 +63,18 @@ describe( 'Typing feature', () => {
 	} );
 
 	it( 'has a buffer configured to default value of config.typing.undoStep', () => {
-		expect( editor.plugins.get( Typing )._buffer ).to.have.property( 'limit', 20 );
+		expect( editor.plugins.get( Input )._buffer ).to.have.property( 'limit', 20 );
 	} );
 
 	it( 'has a buffer configured to config.typing.undoStep', () => {
 		return VirtualTestEditor.create( {
-				features: [ Typing ],
+				features: [ Input ],
 				typing: {
 					undoStep: 5
 				}
 			} )
 			.then( editor => {
-				expect( editor.plugins.get( Typing )._buffer ).to.have.property( 'limit', 5 );
+				expect( editor.plugins.get( Input )._buffer ).to.have.property( 'limit', 5 );
 			} );
 	} );
 
@@ -270,7 +270,7 @@ describe( 'Typing feature', () => {
 
 	describe( 'destroy', () => {
 		it( 'should destroy change buffer', () => {
-			const typing = new Typing( new VirtualTestEditor() );
+			const typing = new Input( new VirtualTestEditor() );
 			typing.init();
 
 			const destroy = typing._buffer.destroy = sinon.spy();