浏览代码

Unify MediaEmbedUI#_setUpDropdown and _setUpForm arguments order, remove unnecessary comment.

Agreed at https://github.com/ckeditor/ckeditor5-media-embed/pull/98/files/4952dc3bc743a462d542b81f7eb5c696a398c34c#r412475345
https://github.com/ckeditor/ckeditor5-media-embed/pull/98#issuecomment-617402368
Tomek Wytrębowicz 5 年之前
父节点
当前提交
fa810d4404
共有 1 个文件被更改,包括 2 次插入3 次删除
  1. 2 3
      packages/ckeditor5-media-embed/src/mediaembedui.js

+ 2 - 3
packages/ckeditor5-media-embed/src/mediaembedui.js

@@ -45,11 +45,10 @@ export default class MediaEmbedUI extends Plugin {
 		editor.ui.componentFactory.add( 'mediaEmbed', locale => {
 			const dropdown = createDropdown( locale );
 
-			// Prepare custom view for dropdown's panel.
 			const mediaForm = new MediaFormView( getFormValidators( editor.t, registry ), editor.locale );
 
 			this._setUpDropdown( dropdown, mediaForm, command, editor );
-			this._setUpForm( mediaForm, dropdown, command );
+			this._setUpForm( dropdown, mediaForm, command );
 
 			return dropdown;
 		} );
@@ -99,7 +98,7 @@ export default class MediaEmbedUI extends Plugin {
 		}
 	}
 
-	_setUpForm( form, dropdown, command ) {
+	_setUpForm( dropdown, form, command ) {
 		form.delegate( 'submit', 'cancel' ).to( dropdown );
 		form.urlInputView.bind( 'value' ).to( command, 'value' );