Parcourir la source

Renamed config.toolbar.shouldGroupWhenFull to config.toolbar.shouldNotGroupWhenFull.

Aleksander Nowodzinski il y a 6 ans
Parent
commit
eded7da40c

+ 2 - 2
packages/ckeditor5-editor-classic/src/classiceditor.js

@@ -70,9 +70,9 @@ export default class ClassicEditor extends Editor {
 
 
 		this.model.document.createRoot();
 		this.model.document.createRoot();
 
 
-		const shouldGroupWhenFull = this.config.get( 'toolbar.shouldGroupWhenFull' );
+		const shouldToolbarGroupWhenFull = !this.config.get( 'toolbar.shouldNotGroupWhenFull' );
 		const view = new ClassicEditorUIView( this.locale, this.editing.view, {
 		const view = new ClassicEditorUIView( this.locale, this.editing.view, {
-			shouldToolbarGroupWhenFull: shouldGroupWhenFull === undefined ? true : shouldGroupWhenFull
+			shouldToolbarGroupWhenFull
 		} );
 		} );
 
 
 		this.ui = new ClassicEditorUI( this, view );
 		this.ui = new ClassicEditorUI( this, view );

+ 2 - 2
packages/ckeditor5-editor-classic/tests/classiceditor.js

@@ -113,11 +113,11 @@ describe( 'ClassicEditor', () => {
 					editorElement.remove();
 					editorElement.remove();
 				} );
 				} );
 
 
-				it( 'can be disabled using config.toolbar.shouldGroupWhenFull', () => {
+				it( 'can be disabled using config.toolbar.shouldNotGroupWhenFull', () => {
 					const editorElement = document.createElement( 'div' );
 					const editorElement = document.createElement( 'div' );
 					const editor = new ClassicEditor( editorElement, {
 					const editor = new ClassicEditor( editorElement, {
 						toolbar: {
 						toolbar: {
-							shouldGroupWhenFull: false
+							shouldNotGroupWhenFull: true
 						}
 						}
 					} );
 					} );