MCPcopy
hub / github.com/chartjs/Chart.js / computeOuterLimit

Function computeOuterLimit

src/elements/element.arc.ts:78–81  ·  view source on GitHub ↗
(val)

Source from the content-addressed store, hash-verified

76 // This causes the outer borders to lose their radius entirely, which is rather unexpected. To solve that, if borderRadius > outerRadius
77 // we know that the thickness term will dominate and compute the limits at that point
78 const computeOuterLimit = (val) => {
79 const outerArcLimit = (outerRadius - Math.min(halfThickness, val)) * angleDelta / 2;
80 return _limitValue(val, 0, Math.min(halfThickness, outerArcLimit));
81 };
82
83 return {
84 outerStart: computeOuterLimit(o.outerStart),

Callers 1

parseBorderRadiusFunction · 0.85

Calls 1

_limitValueFunction · 0.85

Tested by

no test coverage detected