Explorar o código

Other: Update batch API usage.

Maciej Gołaszewski %!s(int64=8) %!d(string=hai) anos
pai
achega
911560de9a
Modificáronse 1 ficheiros con 2 adicións e 2 borrados
  1. 2 2
      packages/ckeditor5-alignment/src/alignmentcommand.js

+ 2 - 2
packages/ckeditor5-alignment/src/alignmentcommand.js

@@ -134,7 +134,7 @@ export default class AlignmentCommand extends Command {
 // @private
 function removeAlignmentFromSelection( blocks, batch ) {
 	for ( const block of blocks ) {
-		batch.removeAttribute( block, 'alignment' );
+		batch.removeAttribute( 'alignment', block );
 	}
 }
 
@@ -142,6 +142,6 @@ function removeAlignmentFromSelection( blocks, batch ) {
 // @private
 function setAlignmentOnSelection( blocks, batch, type ) {
 	for ( const block of blocks ) {
-		batch.setAttribute( block, 'alignment', type );
+		batch.setAttribute( 'alignment', type, block );
 	}
 }