Skip to content

Commit

Permalink
fix RTL tooltip colorBox placement chartjs#10771
Browse files Browse the repository at this point in the history
  • Loading branch information
shahabhm committed Jan 15, 2023
1 parent 97bc329 commit 6ebf3b1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/plugins/plugin.tooltip.js
Original file line number Diff line number Diff line change
Expand Up @@ -818,8 +818,8 @@ export class Tooltip extends Element {
ctx.lineDashOffset = labelColors.borderDashOffset || 0;

// Fill a white rect so that colours merge nicely if the opacity is < 1
const outerX = rtlHelper.leftForLtr(rtlColorX, boxWidth - boxPadding);
const innerX = rtlHelper.leftForLtr(rtlHelper.xPlus(rtlColorX, 1), boxWidth - boxPadding - 2);
const outerX = rtlHelper.leftForLtr(rtlColorX, boxWidth);
const innerX = rtlHelper.leftForLtr(rtlHelper.xPlus(rtlColorX, 1), boxWidth - 2);
const borderRadius = toTRBLCorners(labelColors.borderRadius);

if (Object.values(borderRadius).some(v => v !== 0)) {
Expand Down

0 comments on commit 6ebf3b1

Please sign in to comment.