Skip to content

Commit 57f3176

Browse files
committed
should be center - there is no middle xanchor for colorbar
1 parent ac37c68 commit 57f3176

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/components/colorbar/draw.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ function drawColorBar(g, opts, gd) {
208208
// then fix at the end (since we don't know the width yet)
209209
var xLeft = Math.round(opts.x * gs.w + opts.xpad);
210210
// for dragging... this is getting a little muddled...
211-
var xLeftFrac = opts.x - thickFrac * ({middle: 0.5, right: 1}[opts.xanchor] || 0);
211+
var xLeftFrac = opts.x - thickFrac * ({center: 0.5, right: 1}[opts.xanchor] || 0);
212212

213213
// y positioning we can do correctly from the start
214214
var yBottomFrac = opts.y + lenFrac * (({top: -0.5, bottom: 0.5}[opts.yanchor] || 0) - 0.5);

0 commit comments

Comments
 (0)