From b9f860ccfc42b0dd08fefee7503dede0c012e48e Mon Sep 17 00:00:00 2001 From: Oskar Damkjaer Date: Wed, 7 Jul 2021 16:07:59 +0200 Subject: [PATCH] Simplify --- .../D3Visualization/components/Explorer.tsx | 4 +++ src/browser/modules/Frame/styled.tsx | 6 +--- .../Stream/CypherFrame/CypherFrame.tsx | 32 +++++++------------ 3 files changed, 17 insertions(+), 25 deletions(-) diff --git a/src/browser/modules/D3Visualization/components/Explorer.tsx b/src/browser/modules/D3Visualization/components/Explorer.tsx index 9c6d8a03c0c..8fd07a2f8bf 100644 --- a/src/browser/modules/D3Visualization/components/Explorer.tsx +++ b/src/browser/modules/D3Visualization/components/Explorer.tsx @@ -205,6 +205,10 @@ export class ExplorerComponent extends Component { /> ) } + const inspectingItemType = + !this.state.inspectorContracted && + ((this.state.hoveredItem && this.state.hoveredItem.type !== 'canvas') || + (this.state.selectedItem && this.state.selectedItem.type !== 'canvas')) return ( ` - flex-grow: 1; overflow: auto; min-height: ${dim.frameBodyHeight / 2}px; max-height: ${props => { @@ -123,7 +122,7 @@ export const StyledFrameContents = styled.div` export const StyledFrameStatusbar = styled.div` border-top: ${props => props.theme.inFrameBorder}; - height: ${dim.frameStatusbarHeight}px; + height: ${dim.frameStatusbarHeight - 1}px; ${props => props.fullscreen && `position: fixed; @@ -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` diff --git a/src/browser/modules/Stream/CypherFrame/CypherFrame.tsx b/src/browser/modules/Stream/CypherFrame/CypherFrame.tsx index aa702ea0ef0..cd7cd4e88f1 100644 --- a/src/browser/modules/Stream/CypherFrame/CypherFrame.tsx +++ b/src/browser/modules/Stream/CypherFrame/CypherFrame.tsx @@ -347,27 +347,19 @@ export class CypherFrame extends Component { /> -
{ + this.visElement = { svgElement, graphElement, type: 'graph' } + this.setState({ hasVis: true }) }} - > - { - this.visElement = { svgElement, graphElement, type: 'graph' } - this.setState({ hasVis: true }) - }} - initialNodeDisplay={this.props.initialNodeDisplay} - autoComplete={this.props.autoComplete} - maxNeighbours={this.props.maxNeighbours} - /> -
+ initialNodeDisplay={this.props.initialNodeDisplay} + autoComplete={this.props.autoComplete} + maxNeighbours={this.props.maxNeighbours} + />
)