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

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

Complexity

Total Complexity 1
Complexity/F 1

Size

Lines of Code 20
Function Count 1

Duplication

Duplicated Lines 0
Ratio 0 %

Importance

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

1 Function

Rating   Name   Duplication   Size   Complexity  
A highlight-background.ts ➔ createHighlightBackground 0 15 1
1
import { DependencyNode, NodeSelection } from '../../components/types';
2
import { Selection } from 'd3-selection';
3
import { Colors, ElementIds } from '../../utils/AppConsts';
4
5
export function createHighlightBackground(
6
    svgContainer: NodeSelection<SVGGElement>
7
): Selection<SVGRectElement, DependencyNode, Element, HTMLElement> {
8
    return svgContainer
9
        .append('rect')
10
        .attr('id', ElementIds.HIGHLIGHT_BACKGROUND)
11
        .attr('width', 0)
12
        .attr('height', 0)
13
        .attr('x', 0)
14
        .attr('y', 0)
15
        .attr('rx', 5)
16
        .attr('ry', 5)
17
        .attr('fill', Colors.BLUE_GREY)
18
        .style('opacity', 0);
19
}
20