Skip to content

Commit

Permalink
Give a variable a more precise name.
Browse files Browse the repository at this point in the history
  • Loading branch information
mmotyczynska committed Sep 7, 2023
1 parent 8be30ee commit be765a0
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions packages/ckeditor5-image/src/imageresize/imageresizeediting.ts
Original file line number Diff line number Diff line change
Expand Up @@ -108,14 +108,14 @@ export default class ImageResizeEditing extends Plugin {
}

const viewWriter = conversionApi.writer;
const figure = conversionApi.mapper.toViewElement( data.item );
const viewImg = conversionApi.mapper.toViewElement( data.item );

if ( data.attributeNewValue !== null ) {
viewWriter.setStyle( 'width', data.attributeNewValue, figure );
viewWriter.addClass( 'image_resized', figure );
viewWriter.setStyle( 'width', data.attributeNewValue, viewImg );
viewWriter.addClass( 'image_resized', viewImg );
} else {
viewWriter.removeStyle( 'width', figure );
viewWriter.removeClass( 'image_resized', figure );
viewWriter.removeStyle( 'width', viewImg );
viewWriter.removeClass( 'image_resized', viewImg );
}
} )
);
Expand Down

0 comments on commit be765a0

Please sign in to comment.