Explorar o código

Changed the order of *EditorUI constructor parameters.

Aleksander Nowodzinski %!s(int64=9) %!d(string=hai) anos
pai
achega
cd488b9411

+ 2 - 2
packages/ckeditor5-ui/src/editableui/editableui.js

@@ -23,11 +23,11 @@ export default class EditableUI extends Controller {
 	/**
 	 * Creates an instance of {@link ui.editableUI.EditableUI} class.
 	 *
-	 * @param {ckeditor5.Editor} editor The editor instance.
 	 * @param {engine.view.RootEditableElement} editable The editable element (in the engine).
 	 * @param {ui.View} [view] An instance of EditableUIView.
+	 * @param {ckeditor5.Editor} [editor] The editor instance.
 	 */
-	constructor( editor, editable, view ) {
+	constructor( editable, view, editor ) {
 		super( editable, view );
 
 		/**

+ 1 - 1
packages/ckeditor5-ui/tests/editableui/editableui.js

@@ -19,7 +19,7 @@ describe( 'EditableUI', () => {
 		editor = new StandardEditor();
 		editable = editor.editing.view.createRoot( document.createElement( 'div' ) );
 		editableUIView = new EditableUIView( editor.locale );
-		editableUI = new EditableUI( editor, editable, editableUIView );
+		editableUI = new EditableUI( editable, editableUIView, editor );
 	} );
 
 	describe( 'constructor', () => {

+ 2 - 2
packages/ckeditor5-ui/tests/editableui/editableuiview.js

@@ -25,7 +25,7 @@ describe( 'EditableUIView', () => {
 		view = new EditableUIView( locale );
 		editableElement = document.createElement( 'div' );
 
-		return new EditableUI( null, editable, view ).init();
+		return new EditableUI( editable, view ).init();
 	} );
 
 	describe( 'constructor', () => {
@@ -79,7 +79,7 @@ describe( 'EditableUIView', () => {
 		it( 'updates contentEditable property of editableElement', () => {
 			view = new EditableUIView( locale, editableElement );
 
-			return new EditableUI( null, editable, view ).init().then( () => {
+			return new EditableUI( editable, view ).init().then( () => {
 				expect( view.editableElement.contentEditable ).to.equal( 'true' );
 
 				view.destroy();

+ 1 - 1
packages/ckeditor5-ui/tests/editableui/inline/inlineeditableuiview.js

@@ -25,7 +25,7 @@ describe( 'InlineEditableUIView', () => {
 		view = new InlineEditableUIView( locale );
 		editableElement = document.createElement( 'div' );
 
-		return new EditableUI( null, editable, view ).init();
+		return new EditableUI( editable, view ).init();
 	} );
 
 	describe( 'constructor', () => {