diff --git a/src/lib/AnnotationControls.scss b/src/lib/AnnotationControls.scss
index d95b664214..36359b2f14 100644
--- a/src/lib/AnnotationControls.scss
+++ b/src/lib/AnnotationControls.scss
@@ -2,9 +2,9 @@
padding: 0 4px 0 8px;
border-left: 1px solid $twos;
- & .bp-AnnotationControls-regionBtn {
- width: 32px;
- height: 32px;
+ .bp-AnnotationControls-regionBtn {
+ width: $controls-button-width;
+ height: $controls-button-width;
border-radius: 4px;
svg {
diff --git a/src/lib/AnnotationControls.ts b/src/lib/AnnotationControls.ts
index 32864f3896..3f0a7ab442 100644
--- a/src/lib/AnnotationControls.ts
+++ b/src/lib/AnnotationControls.ts
@@ -10,6 +10,8 @@ export type Options = {
onRegionClick?: Function;
};
+declare const __: (key: string) => string;
+
export default class AnnotationControls {
/** @property {Controls} - Controls object */
private controls: Controls;
@@ -60,8 +62,6 @@ export default class AnnotationControls {
public init({ onRegionClick = noop }: Options = {}): void {
const groupElement = this.controls.addGroup(CLASS_ANNOTATIONS_GROUP);
this.controls.add(
- // eslint-disable-next-line @typescript-eslint/ban-ts-ignore
- // @ts-ignore
__('region_comment'),
this.handleRegionClick(onRegionClick),
`${CLASS_BOX_CONTROLS_GROUP_BUTTON} ${CLASS_REGION_BUTTON}`,
diff --git a/src/lib/Controls.scss b/src/lib/Controls.scss
index e43fd27eb5..93d49d0c50 100644
--- a/src/lib/Controls.scss
+++ b/src/lib/Controls.scss
@@ -1,3 +1,8 @@
+$controls-button-width: 32px;
+
+@import './AnnotationControls';
+@import './ZoomControls';
+
.bp-controls-wrapper {
position: absolute;
bottom: 25px;
@@ -166,7 +171,7 @@
margin-left: 4px;
.bp-controls-group-btn {
- width: 32px;
+ width: $controls-button-width;
}
& + .bp-controls-cell {
diff --git a/src/lib/Preview.js b/src/lib/Preview.js
index 1197f184bf..6715c218aa 100644
--- a/src/lib/Preview.js
+++ b/src/lib/Preview.js
@@ -926,6 +926,7 @@ class Preview extends EventEmitter {
// Whether annotations v4 buttons should be shown in toolbar
this.options.showAnnotationsControls = !!options.showAnnotationsControls;
+ // this.options.showAnnotationsControls = true;
// Enable or disable hotkeys
this.options.useHotkeys = options.useHotkeys !== false;
diff --git a/src/lib/Preview.scss b/src/lib/Preview.scss
index 6c5976b02d..6df3fe0195 100644
--- a/src/lib/Preview.scss
+++ b/src/lib/Preview.scss
@@ -1,8 +1,6 @@
@import 'common';
@import 'loading';
@import 'navigation';
-@import './AnnotationControls';
@import './Controls';
@import './ProgressBar';
@import './VirtualScroller';
-@import './ZoomControls';
diff --git a/src/lib/icons/annotation_region_comment.svg b/src/lib/icons/annotation_region_comment.svg
deleted file mode 100644
index ebaa2fbe06..0000000000
--- a/src/lib/icons/annotation_region_comment.svg
+++ /dev/null
@@ -1,3 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/icons/icons.js b/src/lib/icons/icons.js
index 151c20c98a..f3c8a55cf1 100644
--- a/src/lib/icons/icons.js
+++ b/src/lib/icons/icons.js
@@ -6,7 +6,7 @@ import FULLSCREEN_OUT from './full_screen_out_24px.svg';
import ROTATE_LEFT from './rotate_left_24px.svg';
import ZOOM_IN from './zoom_in.svg';
import ZOOM_OUT from './zoom_out.svg';
-import REGION_COMMENT from './annotation_region_comment.svg';
+import REGION_COMMENT from './region_comment.svg';
import ARROW_LEFT from './arrow_left_24px.svg';
import ARROW_RIGHT from './arrow_right_24px.svg';
import CHECK_MARK from './checkmark_24px.svg';
diff --git a/src/lib/icons/region_comment.svg b/src/lib/icons/region_comment.svg
new file mode 100644
index 0000000000..44d60d9e7c
--- /dev/null
+++ b/src/lib/icons/region_comment.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/src/lib/viewers/doc/DocBaseViewer.js b/src/lib/viewers/doc/DocBaseViewer.js
index d4caaed7a9..a4f59b5a80 100644
--- a/src/lib/viewers/doc/DocBaseViewer.js
+++ b/src/lib/viewers/doc/DocBaseViewer.js
@@ -97,12 +97,12 @@ class DocBaseViewer extends BaseViewer {
this.pinchToZoomEndHandler = this.pinchToZoomEndHandler.bind(this);
this.pinchToZoomStartHandler = this.pinchToZoomStartHandler.bind(this);
this.print = this.print.bind(this);
+ this.regionClickHandler = this.regionClickHandler.bind(this);
this.setPage = this.setPage.bind(this);
this.throttledScrollHandler = this.getScrollHandler().bind(this);
this.toggleThumbnails = this.toggleThumbnails.bind(this);
this.zoomIn = this.zoomIn.bind(this);
this.zoomOut = this.zoomOut.bind(this);
- this.regionClickHandler = this.regionClickHandler.bind(this);
}
/**