Skip to content
This repository has been archived by the owner on Jun 26, 2020. It is now read-only.

Commit

Permalink
Code style: fix code issues.
Browse files Browse the repository at this point in the history
  • Loading branch information
jodator committed Feb 24, 2020
2 parents d76ee51 + 3b9bc65 commit 886df83
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions src/widgettoolbarrepository.js
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ export default class WidgetToolbarRepository extends Plugin {
this._toolbarDefinitions.set( toolbarId, {
view: toolbarView,
getRelatedElement,
balloonClassName,
balloonClassName
} );
}

Expand Down Expand Up @@ -216,7 +216,7 @@ export default class WidgetToolbarRepository extends Plugin {
this._balloon.add( {
view: toolbarDefinition.view,
position: getBalloonPositionData( this.editor, relatedElement ),
balloonClassName: toolbarDefinition.balloonClassName,
balloonClassName: toolbarDefinition.balloonClassName
} );

// Update toolbar position each time stack with toolbar view is switched to visible.
Expand Down
6 changes: 3 additions & 3 deletions tests/widget.js
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,7 @@ describe( 'Widget', () => {
const keydownHandler = sinon.spy();
const domEventDataMock = {
keyCode: keyCodes.arrowright,
preventDefault: sinon.spy(),
preventDefault: sinon.spy()
};
setModelData( model, '<paragraph>foo</paragraph>[<widget></widget>]' );
viewDocument.on( 'keydown', keydownHandler );
Expand All @@ -387,7 +387,7 @@ describe( 'Widget', () => {
const keydownHandler = sinon.spy();
const domEventDataMock = {
keyCode: keyCodes.arrowleft,
preventDefault: sinon.spy(),
preventDefault: sinon.spy()
};
setModelData( model, '[<widget></widget>]<paragraph>foo</paragraph>' );
viewDocument.on( 'keydown', keydownHandler );
Expand Down Expand Up @@ -850,7 +850,7 @@ describe( 'Widget', () => {
setModelData( model, input );
const scrollStub = sinon.stub( view, 'scrollToTheSelection' );
const domEventDataMock = {
keyCode: direction == 'backward' ? keyCodes.backspace : keyCodes.delete,
keyCode: direction == 'backward' ? keyCodes.backspace : keyCodes.delete
};

viewDocument.fire( 'keydown', new DomEventData(
Expand Down
4 changes: 2 additions & 2 deletions tests/widgettoolbarrepository.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ describe( 'WidgetToolbarRepository', () => {
it( 'should create a widget toolbar and add it to the collection', () => {
widgetToolbarRepository.register( 'fake', {
items: editor.config.get( 'fake.toolbar' ),
getRelatedElement: () => null,
getRelatedElement: () => null
} );

expect( widgetToolbarRepository._toolbarDefinitions.size ).to.equal( 1 );
Expand Down Expand Up @@ -510,7 +510,7 @@ describe( 'WidgetToolbarRepository - integration with the BalloonToolbar', () =>
it( 'balloon toolbar should be hidden when the widget is selected', () => {
widgetToolbarRepository.register( 'fake', {
items: editor.config.get( 'fake.toolbar' ),
getRelatedElement: getSelectedFakeWidget,
getRelatedElement: getSelectedFakeWidget
} );

const fakeWidgetToolbarView = widgetToolbarRepository._toolbarDefinitions.get( 'fake' ).view;
Expand Down

0 comments on commit 886df83

Please sign in to comment.