source: node_modules/recharts/lib/util/getRadiusAndStrokeWidthFromDot.js@ a762898

Last change on this file since a762898 was a762898, checked in by istevanoska <ilinastevanoska@…>, 6 months ago

Added visualizations

  • Property mode set to 100644
File size: 878 bytes
Line 
1"use strict";
2
3Object.defineProperty(exports, "__esModule", {
4 value: true
5});
6exports.getRadiusAndStrokeWidthFromDot = getRadiusAndStrokeWidthFromDot;
7var _svgPropertiesNoEvents = require("./svgPropertiesNoEvents");
8function getRadiusAndStrokeWidthFromDot(dot) {
9 var props = (0, _svgPropertiesNoEvents.svgPropertiesNoEventsFromUnknown)(dot);
10 var defaultR = 3;
11 var defaultStrokeWidth = 2;
12 if (props != null) {
13 var {
14 r,
15 strokeWidth
16 } = props;
17 var realR = Number(r);
18 var realStrokeWidth = Number(strokeWidth);
19 if (Number.isNaN(realR) || realR < 0) {
20 realR = defaultR;
21 }
22 if (Number.isNaN(realStrokeWidth) || realStrokeWidth < 0) {
23 realStrokeWidth = defaultStrokeWidth;
24 }
25 return {
26 r: realR,
27 strokeWidth: realStrokeWidth
28 };
29 }
30 return {
31 r: defaultR,
32 strokeWidth: defaultStrokeWidth
33 };
34}
Note: See TracBrowser for help on using the repository browser.