Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(controls): update region annotation icon
Browse files Browse the repository at this point in the history
* Remove un-needed class
mickr committed May 23, 2020
1 parent 485bc25 commit 5268394
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/lib/AnnotationControls.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import noop from 'lodash/noop';

import { ICON_REGION_COMMENT } from './icons/icons';
import Controls, { CONTROLS_BUTTON_CLASS } from './Controls';
import Controls from './Controls';
import fullscreen from './Fullscreen';

export const CLASS_ANNOTATIONS_GROUP = 'bp-AnnotationControls-group';
@@ -153,7 +153,7 @@ export default class AnnotationControls {
const regionButton = this.controls.add(
__('region_comment'),
this.handleClick(onRegionClick, AnnotationMode.REGION),
`${CONTROLS_BUTTON_CLASS} ${CLASS_REGION_BUTTON}`,
CLASS_REGION_BUTTON,
ICON_REGION_COMMENT,
'button',
groupElement,
2 changes: 1 addition & 1 deletion src/lib/Controls.js
Original file line number Diff line number Diff line change
@@ -3,7 +3,7 @@ import Browser from './Browser';
import { CLASS_HIDDEN } from './constants';

const SHOW_PREVIEW_CONTROLS_CLASS = 'box-show-preview-controls';
export const CONTROLS_BUTTON_CLASS = 'bp-controls-btn';
const CONTROLS_BUTTON_CLASS = 'bp-controls-btn';
const CONTROLS_PAGE_NUM_INPUT_CLASS = 'bp-page-num-input';
const CONTROLS_PAGE_NUM_WRAPPER_CLASS = 'bp-page-num-wrapper';
const CONTROLS_AUTO_HIDE_TIMEOUT_IN_MILLIS = 2000;
4 changes: 2 additions & 2 deletions src/lib/__tests__/AnnotationControls-test.js
Original file line number Diff line number Diff line change
@@ -7,7 +7,7 @@ import AnnotationControls, {
CLASS_GROUP_HIDE,
CLASS_REGION_BUTTON,
} from '../AnnotationControls';
import Controls, { CONTROLS_BUTTON_CLASS } from '../Controls';
import Controls from '../Controls';
import fullscreen from '../Fullscreen';

let annotationControls;
@@ -89,7 +89,7 @@ describe('lib/AnnotationControls', () => {
expect(annotationControls.controls.add).to.be.calledWith(
__('region_comment'),
stubs.regionHandler,
`${CONTROLS_BUTTON_CLASS} ${CLASS_REGION_BUTTON}`,
CLASS_REGION_BUTTON,
ICON_REGION_COMMENT,
'button',
sinon.match.any,

0 comments on commit 5268394

Please sign in to comment.