|
@@ -25,23 +25,26 @@ interface IEmbedHostComponentProps {
|
|
|
|
|
|
export class EmbedHostComponent extends React.Component<IEmbedHostComponentProps> {
|
|
|
private _once = true;
|
|
|
+ private splitRef: React.RefObject<HTMLDivElement>;
|
|
|
+ private topPartRef: React.RefObject<HTMLDivElement>;
|
|
|
+ private bottomPartRef: React.RefObject<HTMLDivElement>;
|
|
|
|
|
|
constructor(props: IEmbedHostComponentProps) {
|
|
|
super(props);
|
|
|
}
|
|
|
|
|
|
componentDidMount() {
|
|
|
- const container = this.refs.split;
|
|
|
+ const container = this.splitRef.current;
|
|
|
|
|
|
if (!container) {
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
- Split([this.refs.topPart, this.refs.bottomPart], {
|
|
|
+ Split([this.topPartRef.current, this.bottomPartRef.current], {
|
|
|
direction: "vertical",
|
|
|
minSize: [200, 200],
|
|
|
gutterSize: 4
|
|
|
- })
|
|
|
+ });
|
|
|
}
|
|
|
|
|
|
renderContent() {
|
|
@@ -66,15 +69,15 @@ export class EmbedHostComponent extends React.Component<IEmbedHostComponentProps
|
|
|
}
|
|
|
|
|
|
return (
|
|
|
- <div ref="split" id="split" className="noPopup">
|
|
|
- <div id="topPart" ref="topPart">
|
|
|
+ <div ref={this.splitRef} id="split" className="noPopup">
|
|
|
+ <div id="topPart" ref={this.topPartRef}>
|
|
|
<SceneExplorerComponent scene={this.props.scene}
|
|
|
extensibilityGroups={this.props.extensibilityGroups}
|
|
|
globalState={this.props.globalState}
|
|
|
popupMode={true}
|
|
|
noHeader={true} />
|
|
|
</div>
|
|
|
- <div id="bottomPart" ref="bottomPart" style={{ marginTop: "4px", overflow: "hidden" }}>
|
|
|
+ <div id="bottomPart" ref={this.bottomPartRef} style={{ marginTop: "4px", overflow: "hidden" }}>
|
|
|
<ActionTabsComponent scene={this.props.scene}
|
|
|
globalState={this.props.globalState}
|
|
|
popupMode={true}
|
|
@@ -82,7 +85,7 @@ export class EmbedHostComponent extends React.Component<IEmbedHostComponentProps
|
|
|
initialTab={this.props.initialTab} />
|
|
|
</div>
|
|
|
</div>
|
|
|
- )
|
|
|
+ );
|
|
|
}
|
|
|
|
|
|
render() {
|