Total Complexity | 1 |
Complexity/F | 1 |
Lines of Code | 20 |
Function Count | 1 |
Duplicated Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | import { DependencyNode, NodeSelection } from '../../components/types'; |
||
2 | import { Selection } from 'd3-selection'; |
||
3 | import { ElementColors, 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', ElementColors.HIGHLIGHT_BACKGROUND) |
||
18 | .style('opacity', 0); |
||
19 | } |
||
20 |