Skip to content

Commit

Permalink
fix: removed unnecessary collider
Browse files Browse the repository at this point in the history
  • Loading branch information
Moranski25 committed Nov 18, 2024
1 parent 49d2859 commit 9bdd5e4
Showing 1 changed file with 0 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,6 @@ function checkText(text) {
return typeof text === 'string' || typeof text === 'number' ? text : '-';
}

function collider(struct, tickPos) {
if (struct.align === 'right') {
if (tickPos.x >= struct.x) {
struct.text = '';
}
}
}

function calculateMaxWidth(buildOpts, side, innerPos) {
let maxWidth;
if (side === 'left') {
Expand All @@ -47,10 +39,6 @@ function checkRadialOutOfBounds(buildOpts, innerPos, struct) {
return maxHeightBottom;
}

function appendCollider(tick, struct, buildOpts, tickPos) {
collider(tick, struct, buildOpts, tickPos);
}

function appendBounds(struct, buildOpts) {
struct.boundingRect = buildOpts.textBounds(struct);
}
Expand Down Expand Up @@ -106,10 +94,8 @@ export default function buildArcLabels(tick, buildOpts) {
baseline: 'middle',
};

const tickPos = polarToCartesian(centerPoint.cx, centerPoint.cy, outerRadius + 6, angle);
appendStyle(struct, buildOpts);
appendBounds(struct, buildOpts);
appendCollider(struct, tickPos);
checkRadialOutOfBounds(buildOpts, innerPos, struct);
return struct;
}

0 comments on commit 9bdd5e4

Please sign in to comment.