Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions src/browser/components/icons/Icons.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -244,17 +244,19 @@ export const ErrorIcon = () => (
<IconContainer className="fa fa-file-text-o" text="Error" />
)

export const ZoomInIcon = () => (
export const ZoomInIcon = (props: any) => (
<IconContainer
activeStyle={inactive}
inactiveStyle={inactive}
{...props}
className="sl-zoom-in"
/>
)
export const ZoomOutIcon = () => (
export const ZoomOutIcon = (props: any) => (
<IconContainer
activeStyle={inactive}
inactiveStyle={inactive}
{...props}
className="sl-zoom-out"
/>
)
Expand Down
43 changes: 20 additions & 23 deletions src/browser/modules/D3Visualization/components/Graph.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -133,29 +133,26 @@ export class GraphComponent extends Component<any, State> {
}

zoomButtons() {
if (this.props.fullscreen) {
return (
<StyledZoomHolder>
<StyledZoomButton
className={
this.state.zoomInLimitReached ? 'faded zoom-in' : 'zoom-in'
}
onClick={this.zoomInClicked.bind(this)}
>
<ZoomInIcon />
</StyledZoomButton>
<StyledZoomButton
className={
this.state.zoomOutLimitReached ? 'faded zoom-out' : 'zoom-out'
}
onClick={this.zoomOutClicked.bind(this)}
>
<ZoomOutIcon />
</StyledZoomButton>
</StyledZoomHolder>
)
}
return null
return (
<StyledZoomHolder>
<StyledZoomButton
className={
this.state.zoomInLimitReached ? 'faded zoom-in' : 'zoom-in'
}
onClick={this.zoomInClicked.bind(this)}
>
<ZoomInIcon regulateSize={this.props.fullscreen ? 2 : 1} />
</StyledZoomButton>
<StyledZoomButton
className={
this.state.zoomOutLimitReached ? 'faded zoom-out' : 'zoom-out'
}
onClick={this.zoomOutClicked.bind(this)}
>
<ZoomOutIcon regulateSize={this.props.fullscreen ? 2 : 1} />
</StyledZoomButton>
</StyledZoomHolder>
)
}

render() {
Expand Down
1 change: 0 additions & 1 deletion src/browser/modules/D3Visualization/components/styled.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,6 @@ export const StyledZoomHolder = styled.div`
export const StyledZoomButton = styled.button`
display: list-item;
list-style-type: none;
font-size: 2em;
margin-bottom: 10px;
border: none;
color: #9b9da2;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,26 @@ exports[`Visualization renders with result and escapes any HTML 1`] = `
</g>
</g>
</svg>
<div
class="sc-eHgmQL fbpore"
>
<button
class="sc-cvbbAY ZoyPP faded zoom-in"
>
<i
class="sc-bYSBpT eYFbay sl-zoom-in"
style="font-size: 1em;"
/>
</button>
<button
class="sc-cvbbAY ZoyPP zoom-out"
>
<i
class="sc-elJkPf OBknV sl-zoom-out"
style="font-size: 1em;"
/>
</button>
</div>
</div>
<div
class="sc-gqjmRU dwJWly status-bar"
Expand Down