Przeglądaj źródła

Used the new ToolbarView API after code refactoring.

Aleksander Nowodzinski 6 lat temu
rodzic
commit
8ee817d5ce

+ 0 - 5
packages/ckeditor5-editor-decoupled/src/decouplededitorui.js

@@ -115,7 +115,6 @@ export default class DecoupledEditorUI extends EditorUI {
 		const toolbar = view.toolbar;
 
 		toolbar.fillFromConfig( this._toolbarConfig.items, this.componentFactory );
-		toolbar.shouldGroupWhenFull = true;
 
 		enableToolbarKeyboardFocus( {
 			origin: editor.editing.view,
@@ -123,10 +122,6 @@ export default class DecoupledEditorUI extends EditorUI {
 			originKeystrokeHandler: editor.keystrokes,
 			toolbar
 		} );
-
-		this.on( 'update', () => {
-			toolbar.updateGroupedItems();
-		} );
 	}
 
 	/**

+ 3 - 1
packages/ckeditor5-editor-decoupled/src/decouplededitoruiview.js

@@ -40,7 +40,9 @@ export default class DecoupledEditorUIView extends EditorUIView {
 		 * @readonly
 		 * @member {module:ui/toolbar/toolbarview~ToolbarView}
 		 */
-		this.toolbar = new ToolbarView( locale );
+		this.toolbar = new ToolbarView( locale, {
+			shouldGroupWhenFull: true
+		} );
 
 		/**
 		 * The editable of the decoupled editor UI.