Skip to content

Commit

Permalink
Simplify
Browse files Browse the repository at this point in the history
  • Loading branch information
OskarDamkjaer committed Jul 7, 2021
1 parent b8d9e06 commit b9f860c
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 25 deletions.
4 changes: 4 additions & 0 deletions src/browser/modules/D3Visualization/components/Explorer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,10 @@ export class ExplorerComponent extends Component<any, ExplorerComponentState> {
/>
)
}
const inspectingItemType =
!this.state.inspectorContracted &&
((this.state.hoveredItem && this.state.hoveredItem.type !== 'canvas') ||
(this.state.selectedItem && this.state.selectedItem.type !== 'canvas'))

return (
<StyledFullSizeContainer
Expand Down
6 changes: 1 addition & 5 deletions src/browser/modules/Frame/styled.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ z-index: 130;`
export const StyledFrameBody = styled.div<
FullscreenProps & { collapsed: boolean }
>`
flex-grow: 1;
overflow: auto;
min-height: ${dim.frameBodyHeight / 2}px;
max-height: ${props => {
Expand Down Expand Up @@ -123,7 +122,7 @@ export const StyledFrameContents = styled.div<FullscreenProps>`

export const StyledFrameStatusbar = styled.div<FullscreenProps>`
border-top: ${props => props.theme.inFrameBorder};
height: ${dim.frameStatusbarHeight}px;
height: ${dim.frameStatusbarHeight - 1}px;
${props =>
props.fullscreen &&
`position: fixed;
Expand Down Expand Up @@ -204,9 +203,6 @@ export const StyledFrameCommand = styled.label<{ selectedDb: string | null }>`
export const ContentContainer = styled.div`
margin: 0px 3px;
padding: 2px 2px 0 2px;
display: flex;
flex-direction: column;
max-height: 100vh;
`

export const TitleBarHeader = styled.div`
Expand Down
32 changes: 12 additions & 20 deletions src/browser/modules/Stream/CypherFrame/CypherFrame.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -347,27 +347,19 @@ export class CypherFrame extends Component<CypherFrameProps, CypherFrameState> {
/>
</Display>
<Display if={this.state.openView === viewTypes.VISUALIZATION} lazy>
<div
style={{
maxHeight: '100%',
overflow: 'hidden',
position: 'relative'
<VisualizationConnectedBus
fullscreen={this.state.fullscreen}
result={result}
updated={this.props.request.updated}
frameHeight={this.state.frameHeight}
assignVisElement={(svgElement: any, graphElement: any) => {
this.visElement = { svgElement, graphElement, type: 'graph' }
this.setState({ hasVis: true })
}}
>
<VisualizationConnectedBus
fullscreen={this.state.fullscreen}
result={result}
updated={this.props.request.updated}
frameHeight={this.state.frameHeight}
assignVisElement={(svgElement: any, graphElement: any) => {
this.visElement = { svgElement, graphElement, type: 'graph' }
this.setState({ hasVis: true })
}}
initialNodeDisplay={this.props.initialNodeDisplay}
autoComplete={this.props.autoComplete}
maxNeighbours={this.props.maxNeighbours}
/>
</div>
initialNodeDisplay={this.props.initialNodeDisplay}
autoComplete={this.props.autoComplete}
maxNeighbours={this.props.maxNeighbours}
/>
</Display>
</StyledFrameBody>
)
Expand Down

0 comments on commit b9f860c

Please sign in to comment.