Total Complexity | 1 |
Complexity/F | 1 |
Lines of Code | 21 |
Function Count | 1 |
Duplicated Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | import { NodeSelection } from '../../components/types'; |
||
2 | import { ElementColors, ElementIds, TextColors } 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', ElementColors.BUTTON); |
||
13 | detailsButtonWrapper |
||
14 | .append('text') |
||
15 | .style('opacity', 0) |
||
16 | .style('text-anchor', 'middle') |
||
17 | .attr('fill', TextColors.HIGHLIGHTED) |
||
18 | .text('Details'); |
||
19 | return detailsButtonWrapper; |
||
20 | } |
||
21 |