Skip to content

Commit 7a8af81

Browse files
authored
Add a flag to hide annotation panel (#862)
* Add a flag to hide annotation panel * lint
1 parent fe750d8 commit 7a8af81

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

packages/base/src/panelview/rightpanel.tsx

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import {
33
IJGISFormSchemaRegistry,
44
IJupyterGISModel,
55
} from '@jupytergis/schema';
6+
import { PageConfig } from '@jupyterlab/coreutils';
67
import * as React from 'react';
78

89
import { AnnotationsPanel } from './annotationPanel';
@@ -22,12 +23,17 @@ interface IRightPanelProps {
2223
}
2324

2425
export const RightPanel: React.FC<IRightPanelProps> = props => {
26+
const hideAnnotationPanel =
27+
PageConfig.getOption('HIDE_ANNOTATION_PANEL') === 'true';
28+
2529
const [selectedObjectProperties, setSelectedObjectProperties] =
2630
React.useState(undefined);
2731

2832
const tabInfo = [
2933
{ name: 'objectProperties', title: 'Object Properties' },
30-
{ name: 'annotations', title: 'Annotations' },
34+
...(hideAnnotationPanel
35+
? []
36+
: [{ name: 'annotations', title: 'Annotations' }]),
3137
{ name: 'identifyPanel', title: 'Identify Features' },
3238
];
3339

0 commit comments

Comments
 (0)