|
3 | 3 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
4 | 4 |
|
5 | 5 | import React from 'react'; |
6 | | -import SplitterLayout from 'react-splitter-layout'; |
7 | 6 | import classNames from 'classnames'; |
8 | 7 |
|
9 | 8 | import { SourceView } from '../shared/SourceView'; |
10 | 9 | import { AssemblyView } from '../shared/AssemblyView'; |
| 10 | +import { ResizableWithSplitter } from '../shared/ResizableWithSplitter'; |
11 | 11 | import { AssemblyViewToggleButton } from './AssemblyViewToggleButton'; |
12 | 12 | import { AssemblyViewNativeSymbolNavigator } from './AssemblyViewNativeSymbolNavigator'; |
13 | 13 | import { IonGraphView } from '../shared/IonGraphView'; |
@@ -217,43 +217,47 @@ class BottomBoxImpl extends React.PureComponent<Props> { |
217 | 217 |
|
218 | 218 | return ( |
219 | 219 | <div className="bottom-box"> |
220 | | - <SplitterLayout customClassName="bottom-box" percentage> |
221 | | - <div className="bottom-box-pane"> |
222 | | - <div className="bottom-box-bar"> |
223 | | - <h3 className="bottom-box-title">{path ?? '(no source file)'}</h3> |
224 | | - {assemblyViewIsOpen ? null : trailingHeaderButtons} |
225 | | - </div> |
226 | | - <div className="bottom-sourceview-wrapper"> |
227 | | - {displayIonGraph ? ( |
228 | | - <IonGraphView |
229 | | - timings={globalLineTimings} |
230 | | - sourceCode={sourceCode} |
231 | | - /> |
232 | | - ) : null} |
233 | | - {displaySourceView ? ( |
234 | | - <SourceView |
235 | | - timings={globalLineTimings} |
236 | | - sourceCode={sourceCode} |
237 | | - filePath={path} |
238 | | - scrollGeneration={sourceViewScrollGeneration} |
239 | | - scrollToLineNumber={sourceViewScrollToLineNumber} |
240 | | - highlightedLine={sourceViewHighlightedLine} |
241 | | - startLine={sourceViewStartLine} |
242 | | - ref={this._sourceView} |
243 | | - /> |
244 | | - ) : null} |
245 | | - {sourceViewCode !== undefined && |
246 | | - sourceViewCode.type === 'LOADING' ? ( |
247 | | - <CodeLoadingOverlay source={sourceViewCode.source} /> |
248 | | - ) : null} |
249 | | - {sourceViewCode !== undefined && |
250 | | - sourceViewCode.type === 'ERROR' ? ( |
251 | | - <SourceCodeErrorOverlay errors={sourceViewCode.errors} /> |
252 | | - ) : null} |
253 | | - </div> |
| 220 | + <div className="bottom-box-pane"> |
| 221 | + <div className="bottom-box-bar"> |
| 222 | + <h3 className="bottom-box-title">{path ?? '(no source file)'}</h3> |
| 223 | + {assemblyViewIsOpen ? null : trailingHeaderButtons} |
| 224 | + </div> |
| 225 | + <div className="bottom-sourceview-wrapper"> |
| 226 | + {displayIonGraph ? ( |
| 227 | + <IonGraphView |
| 228 | + timings={globalLineTimings} |
| 229 | + sourceCode={sourceCode} |
| 230 | + /> |
| 231 | + ) : null} |
| 232 | + {displaySourceView ? ( |
| 233 | + <SourceView |
| 234 | + timings={globalLineTimings} |
| 235 | + sourceCode={sourceCode} |
| 236 | + filePath={path} |
| 237 | + scrollGeneration={sourceViewScrollGeneration} |
| 238 | + scrollToLineNumber={sourceViewScrollToLineNumber} |
| 239 | + highlightedLine={sourceViewHighlightedLine} |
| 240 | + startLine={sourceViewStartLine} |
| 241 | + ref={this._sourceView} |
| 242 | + /> |
| 243 | + ) : null} |
| 244 | + {sourceViewCode !== undefined && |
| 245 | + sourceViewCode.type === 'LOADING' ? ( |
| 246 | + <CodeLoadingOverlay source={sourceViewCode.source} /> |
| 247 | + ) : null} |
| 248 | + {sourceViewCode !== undefined && sourceViewCode.type === 'ERROR' ? ( |
| 249 | + <SourceCodeErrorOverlay errors={sourceViewCode.errors} /> |
| 250 | + ) : null} |
254 | 251 | </div> |
| 252 | + </div> |
255 | 253 |
|
256 | | - {assemblyViewIsOpen ? ( |
| 254 | + {assemblyViewIsOpen ? ( |
| 255 | + <ResizableWithSplitter |
| 256 | + splitterPosition="start" |
| 257 | + controlledProperty="width" |
| 258 | + percent={true} |
| 259 | + initialSize="50%" |
| 260 | + > |
257 | 261 | <div className="bottom-box-pane"> |
258 | 262 | <div className="bottom-box-bar"> |
259 | 263 | <h3 className="bottom-box-title"> |
@@ -289,8 +293,8 @@ class BottomBoxImpl extends React.PureComponent<Props> { |
289 | 293 | ) : null} |
290 | 294 | </div> |
291 | 295 | </div> |
292 | | - ) : null} |
293 | | - </SplitterLayout> |
| 296 | + </ResizableWithSplitter> |
| 297 | + ) : null} |
294 | 298 | </div> |
295 | 299 | ); |
296 | 300 | } |
|
0 commit comments