8
0
Просмотр исходного кода

Rename IndentBehavior#getNewIndent() to getNextIndent().

Maciej Gołaszewski 6 лет назад
Родитель
Сommit
d96b8507b9

+ 4 - 4
packages/ckeditor5-indent/src/indentblockcommand.js

@@ -78,10 +78,10 @@ export default class IndentBlockCommand extends Command {
 			for ( const item of itemsToChange ) {
 				const currentIndent = item.getAttribute( 'blockIndent' );
 
-				const newIndent = this._indentBehavior.getNewIndent( currentIndent );
+				const nextIndent = this._indentBehavior.getNextIndent( currentIndent );
 
-				if ( newIndent ) {
-					writer.setAttribute( 'blockIndent', newIndent, item );
+				if ( nextIndent ) {
+					writer.setAttribute( 'blockIndent', nextIndent, item );
 				} else {
 					writer.removeAttribute( 'blockIndent', item );
 				}
@@ -107,7 +107,7 @@ export default class IndentBlockCommand extends Command {
 /**
  * Returns new indent attribute value based on current indent.
  *
- * @method #getNewIndent
+ * @method #getNextIndent
  * @param {String} indentAttributeValue Current indent attribute value.
  * @returns {String|undefined}
  */

+ 1 - 1
packages/ckeditor5-indent/src/indentcommandbehavior/indentusingclasses.js

@@ -52,7 +52,7 @@ export default class IndentUsingClasses {
 	/**
 	 * @inheritDoc
 	 */
-	getNewIndent( indentAttributeValue ) {
+	getNextIndent( indentAttributeValue ) {
 		const currentIndex = this.classes.indexOf( indentAttributeValue );
 		const indexStep = this.isForward ? 1 : -1;
 

+ 1 - 1
packages/ckeditor5-indent/src/indentcommandbehavior/indentusingoffset.js

@@ -55,7 +55,7 @@ export default class IndentUsingOffset {
 	/**
 	 * @inheritDoc
 	 */
-	getNewIndent( indentAttributeValue ) {
+	getNextIndent( indentAttributeValue ) {
 		const currentOffset = parseFloat( indentAttributeValue || 0 );
 		const isSameUnit = !indentAttributeValue || indentAttributeValue.endsWith( this.unit );