-
Notifications
You must be signed in to change notification settings - Fork 2
/
coverageTrackOverlay.tsx
70 lines (63 loc) · 2.02 KB
/
coverageTrackOverlay.tsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
import * as React from "react";
import {CircularFigure} from "../../../../circularFigure/circularFigure";
import {Fasta} from "../../../../../fasta";
import {AlignData} from "../../../../../alignData";
import {AlignmentsReportTable} from "../../../../containers/tables/alignmentsReportTable";
import {Overlay} from "./overlay";
export interface CoverageTrackOverlayProps
{
onClose: () => void;
onSave: () => void;
open : boolean;
figure : CircularFigure;
fastas : Array<Fasta>;
aligns : Array<AlignData>;
}
export interface CoverageTrackOverlayState
{
selectedAlignUuid : string;
}
export class CoverageTrackOverlay extends React.Component<CoverageTrackOverlayProps,CoverageTrackOverlayState>
{
public constructor(props : CoverageTrackOverlayProps)
{
super(props);
this.state = {
selectedAlignUuid : ""
};
}
public render() : JSX.Element
{
return (
<Overlay
kind="drawerTop"
restrictions={["noModal","noDrawerLeft","noDrawerRight"]}
open={this.props.open}
onClose={this.props.onClose}
>
<AlignmentsReportTable
viewMore={(rowData) =>
{
this.setState({
selectedAlignUuid : rowData.uuid
});
}}
toolTipText="View Coverage Tracks For This Alignment"
aligns={this.props.aligns.filter((x) =>
{
if(x.fasta)
{
if(x.fasta.uuid == this.props.figure.uuidFasta)
{
return x;
}
}
return undefined;
})}
fastas={this.props.fastas}
onRowClick={() => null}
/>
</Overlay>
);
}
}