Skip to content

Commit

Permalink
plots tab - add cbioTooltip class to tooltips
Browse files Browse the repository at this point in the history
Signed-off-by: Abeshouse, Adam A./Sloan Kettering Institute <abeshoua@mskcc.org>
  • Loading branch information
Abeshouse, Adam A./Sloan Kettering Institute committed Aug 20, 2018
1 parent 86f18b3 commit 634bea0
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
16 changes: 13 additions & 3 deletions src/pages/resultsView/plots/PlotsTab.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -854,16 +854,26 @@ export default class PlotsTab extends React.Component<IPlotsTabProps,{}> {

@autobind
private scatterPlotTooltip(d:IScatterPlotData) {
return scatterPlotTooltip(d);
return (
<div className="cbioportal-frontend cbioTooltip">
{scatterPlotTooltip(d)}
</div>
);
}

@computed get boxPlotTooltip() {
return (d:IBoxScatterPlotPoint)=>{
let content;
if (this.boxPlotData.isComplete) {
return boxPlotTooltip(d, this.boxPlotData.result.horizontal);
content = boxPlotTooltip(d, this.boxPlotData.result.horizontal);
} else {
return <span>Loading... (this shouldnt appear because the box plot shouldnt be visible)</span>;
content = <span>Loading... (this shouldnt appear because the box plot shouldnt be visible)</span>;
}
return (
<div className="cbioportal-frontend cbioTooltip">
{content}
</div>
);
}
}

Expand Down
1 change: 0 additions & 1 deletion src/shared/components/plots/ScatterPlotTooltip.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ export default class ScatterPlotTooltip extends React.Component<IScatterPlotTool
if (this.props.targetHovered || this.isHovered) {
return (
<Popover
id="Scatter Plot Tooltip"
className={this.props.className}
positionLeft={this.props.targetCoords.x + this.props.container.offsetLeft + leftPadding - (!horizontal ? arrowOffsetLeft + 6 : 0)}
positionTop={this.props.targetCoords.y + this.props.container.offsetTop - (horizontal ? arrowOffsetTop : -5)}
Expand Down

0 comments on commit 634bea0

Please sign in to comment.