|
5 | 5 | IJupyterGISModel, |
6 | 6 | } from '@jupytergis/schema'; |
7 | 7 | import * as React from 'react'; |
8 | | -import Draggable from 'react-draggable'; |
9 | 8 |
|
10 | 9 | import { AnnotationsPanel } from './annotationPanel'; |
11 | 10 | import { IdentifyPanelComponent } from './components/identify-panel/IdentifyPanel'; |
@@ -84,66 +83,61 @@ export const RightPanel: React.FC<IRightPanelProps> = props => { |
84 | 83 | React.useState(undefined); |
85 | 84 |
|
86 | 85 | return ( |
87 | | - <Draggable handle=".jgis-panel-tabs" bounds=".jGIS-Mainview-Container"> |
88 | | - <div |
89 | | - className="jgis-right-panel-container" |
90 | | - style={{ display: rightPanelVisible ? 'block' : 'none' }} |
91 | | - > |
92 | | - <PanelTabs className="jgis-panel-tabs" curTab={curTab}> |
93 | | - <TabsList> |
94 | | - {tabInfo.map(tab => ( |
95 | | - <TabsTrigger |
96 | | - className="jGIS-layer-browser-category" |
97 | | - key={tab.name} |
98 | | - value={tab.name} |
99 | | - onClick={() => { |
100 | | - if (curTab !== tab.name) { |
101 | | - setCurTab(tab.name); |
102 | | - } else { |
103 | | - setCurTab(''); |
104 | | - } |
105 | | - }} |
106 | | - > |
107 | | - {tab.title} |
108 | | - </TabsTrigger> |
109 | | - ))} |
110 | | - </TabsList> |
111 | | - |
112 | | - {!settings.objectPropertiesDisabled && ( |
113 | | - <TabsContent |
114 | | - value="objectProperties" |
115 | | - className="jgis-panel-tab-content" |
| 86 | + <div |
| 87 | + className="jgis-right-panel-container" |
| 88 | + style={{ display: rightPanelVisible ? 'block' : 'none' }} |
| 89 | + > |
| 90 | + <PanelTabs className="jgis-panel-tabs" curTab={curTab}> |
| 91 | + <TabsList> |
| 92 | + {tabInfo.map(tab => ( |
| 93 | + <TabsTrigger |
| 94 | + className="jGIS-layer-browser-category" |
| 95 | + key={tab.name} |
| 96 | + value={tab.name} |
| 97 | + onClick={() => { |
| 98 | + if (curTab !== tab.name) { |
| 99 | + setCurTab(tab.name); |
| 100 | + } else { |
| 101 | + setCurTab(''); |
| 102 | + } |
| 103 | + }} |
116 | 104 | > |
117 | | - <ObjectPropertiesReact |
118 | | - setSelectedObject={setSelectedObjectProperties} |
119 | | - selectedObject={selectedObjectProperties} |
120 | | - formSchemaRegistry={props.formSchemaRegistry} |
121 | | - model={props.model} |
122 | | - /> |
123 | | - </TabsContent> |
124 | | - )} |
| 105 | + {tab.title} |
| 106 | + </TabsTrigger> |
| 107 | + ))} |
| 108 | + </TabsList> |
125 | 109 |
|
126 | | - {!settings.annotationsDisabled && ( |
127 | | - <TabsContent value="annotations" className="jgis-panel-tab-content"> |
128 | | - <AnnotationsPanel |
129 | | - annotationModel={props.annotationModel} |
130 | | - jgisModel={props.model} |
131 | | - ></AnnotationsPanel> |
132 | | - </TabsContent> |
133 | | - )} |
| 110 | + {!settings.objectPropertiesDisabled && ( |
| 111 | + <TabsContent |
| 112 | + value="objectProperties" |
| 113 | + className="jgis-panel-tab-content" |
| 114 | + > |
| 115 | + <ObjectPropertiesReact |
| 116 | + setSelectedObject={setSelectedObjectProperties} |
| 117 | + selectedObject={selectedObjectProperties} |
| 118 | + formSchemaRegistry={props.formSchemaRegistry} |
| 119 | + model={props.model} |
| 120 | + /> |
| 121 | + </TabsContent> |
| 122 | + )} |
134 | 123 |
|
135 | | - {!settings.identifyDisabled && ( |
136 | | - <TabsContent |
137 | | - value="identifyPanel" |
138 | | - className="jgis-panel-tab-content" |
139 | | - > |
140 | | - <IdentifyPanelComponent |
141 | | - model={props.model} |
142 | | - ></IdentifyPanelComponent> |
143 | | - </TabsContent> |
144 | | - )} |
145 | | - </PanelTabs> |
146 | | - </div> |
147 | | - </Draggable> |
| 124 | + {!settings.annotationsDisabled && ( |
| 125 | + <TabsContent value="annotations" className="jgis-panel-tab-content"> |
| 126 | + <AnnotationsPanel |
| 127 | + annotationModel={props.annotationModel} |
| 128 | + jgisModel={props.model} |
| 129 | + ></AnnotationsPanel> |
| 130 | + </TabsContent> |
| 131 | + )} |
| 132 | + |
| 133 | + {!settings.identifyDisabled && ( |
| 134 | + <TabsContent value="identifyPanel" className="jgis-panel-tab-content"> |
| 135 | + <IdentifyPanelComponent |
| 136 | + model={props.model} |
| 137 | + ></IdentifyPanelComponent> |
| 138 | + </TabsContent> |
| 139 | + )} |
| 140 | + </PanelTabs> |
| 141 | + </div> |
148 | 142 | ); |
149 | 143 | }; |
0 commit comments