From 221a496939fa5baafade7611eaa9ea5c7d99705d Mon Sep 17 00:00:00 2001 From: Mateusz Samsel Date: Mon, 12 Aug 2019 09:10:57 +0200 Subject: [PATCH 1/2] Set buttons as toggleable and update test to check it. --- src/imagestyle/imagestyleui.js | 3 ++- tests/imagestyle/imagestyleui.js | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/imagestyle/imagestyleui.js b/src/imagestyle/imagestyleui.js index 16452788..7fbca80b 100644 --- a/src/imagestyle/imagestyleui.js +++ b/src/imagestyle/imagestyleui.js @@ -85,7 +85,8 @@ export default class ImageStyleUI extends Plugin { view.set( { label: style.title, icon: style.icon, - tooltip: true + tooltip: true, + isToggleable: true } ); view.bind( 'isEnabled' ).to( command, 'isEnabled' ); diff --git a/tests/imagestyle/imagestyleui.js b/tests/imagestyle/imagestyleui.js index 758bd192..e82b97fb 100644 --- a/tests/imagestyle/imagestyleui.js +++ b/tests/imagestyle/imagestyleui.js @@ -56,6 +56,7 @@ describe( 'ImageStyleUI', () => { expect( buttonView ).to.be.instanceOf( ButtonView ); expect( buttonView.label ).to.equal( style.title ); expect( buttonView.icon ).to.equal( style.icon ); + expect( buttonView.isToggleable ).to.be.true; command.isEnabled = true; expect( buttonView.isEnabled ).to.be.true; From 331a0acbe21b1d450baa705cd1515c07a69e5ca1 Mon Sep 17 00:00:00 2001 From: Maciej Bukowski Date: Mon, 12 Aug 2019 14:35:25 +0200 Subject: [PATCH 2/2] Fixed API docs. --- src/imagestyle/imagestyleediting.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/imagestyle/imagestyleediting.js b/src/imagestyle/imagestyleediting.js index 5ed5f5ca..b2bd1428 100644 --- a/src/imagestyle/imagestyleediting.js +++ b/src/imagestyle/imagestyleediting.js @@ -16,7 +16,7 @@ import { normalizeImageStyles } from './utils'; * The image style engine plugin. It sets the default configuration, creates converters and registers * {@link module:image/imagestyle/imagestylecommand~ImageStyleCommand ImageStyleCommand}. * - * @extends {module:core/plugin~Plugin} + * @extends module:core/plugin~Plugin */ export default class ImageStyleEditing extends Plugin { /**