Passed
Push — master ( e14e22...172c7d )
by
unknown
03:44
created

src/overview/highlight-background/details-button.ts   A

Complexity

Total Complexity 1
Complexity/F 1

Size

Lines of Code 21
Function Count 1

Duplication

Duplicated Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
wmc 1
eloc 19
mnd 0
bc 0
fnc 1
dl 0
loc 21
rs 10
bpm 0
cpm 1
noi 0
c 0
b 0
f 0

1 Function

Rating   Name   Duplication   Size   Complexity  
A details-button.ts ➔ createDetailsButton 0 17 1
1
import { NodeSelection } from '../../components/types';
2
import { Colors, ElementIds } from '../../utils/AppConsts';
3
4
export function createDetailsButton(svgContainer: NodeSelection<SVGGElement>) {
5
    const detailsButtonWrapper = svgContainer
6
        .append('g')
7
        .attr('id', ElementIds.DETAILS_BUTTON)
8
        .attr('cursor', 'pointer');
9
    detailsButtonWrapper
10
        .append('rect')
11
        .style('opacity', 0)
12
        .attr('fill', Colors.BLACK);
13
    detailsButtonWrapper
14
        .append('text')
15
        .style('opacity', 0)
16
        .style('text-anchor', 'middle')
17
        .attr('fill', Colors.WHITE)
18
        .text('Details');
19
    return detailsButtonWrapper;
20
}
21