Explorar el Código

Changed: Remove `dropdown.buttonView` bindings to `dropdown`.

Maciej Gołaszewski hace 8 años
padre
commit
5ee8daa568
Se han modificado 1 ficheros con 4 adiciones y 3 borrados
  1. 4 3
      packages/ckeditor5-alignment/src/alignmentui.js

+ 4 - 3
packages/ckeditor5-alignment/src/alignmentui.js

@@ -90,12 +90,13 @@ export default class AlignmentUI extends Plugin {
 			addToolbarToDropdown( dropdownView, buttons );
 			addToolbarToDropdown( dropdownView, buttons );
 
 
 			// Configure dropdown properties an behavior.
 			// Configure dropdown properties an behavior.
-			dropdownView.set( {
+			dropdownView.buttonView.set( {
 				label: t( 'Text alignment' ),
 				label: t( 'Text alignment' ),
-				isVertical: true,
 				tooltip: true
 				tooltip: true
 			} );
 			} );
 
 
+			dropdownView.toolbarView.isVertical = true;
+
 			dropdownView.extendTemplate( {
 			dropdownView.extendTemplate( {
 				attributes: {
 				attributes: {
 					class: 'ck-alignment-dropdown'
 					class: 'ck-alignment-dropdown'
@@ -106,7 +107,7 @@ export default class AlignmentUI extends Plugin {
 			const defaultIcon = alignLeftIcon;
 			const defaultIcon = alignLeftIcon;
 
 
 			// Change icon to reflect current selection's alignment.
 			// Change icon to reflect current selection's alignment.
-			dropdownView.bind( 'icon' ).toMany( buttons, 'isOn', ( ...areActive ) => {
+			dropdownView.buttonView.bind( 'icon' ).toMany( buttons, 'isOn', ( ...areActive ) => {
 				// Get the index of an active button.
 				// Get the index of an active button.
 				const index = areActive.findIndex( value => value );
 				const index = areActive.findIndex( value => value );