Skip to content

Commit fe9e99b

Browse files
committed
keep titlepad when aligned to the right
1 parent eeb66ab commit fe9e99b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: src/components/legend/draw.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -668,7 +668,7 @@ function computeTextDimensions(g, gd, legendObj, aTitle) {
668668
} else if(legendObj.title.side === 'top center') {
669669
if(legendObj._width) titleOffset = 0.5 * (legendObj._width - 2 * bw - 2 * constants.titlePad - width);
670670
} else if(legendObj.title.side === 'top right') {
671-
if(legendObj._width) titleOffset = legendObj._width - 2 * bw - constants.titlePad - width;
671+
if(legendObj._width) titleOffset = legendObj._width - 2 * bw - 2 * constants.titlePad - width;
672672
}
673673

674674
svgTextUtils.positionText(textEl,

0 commit comments

Comments
 (0)