Skip to content

Commit 2594e59

Browse files
committed
Update defaults
1 parent 61e8277 commit 2594e59

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

src/components/colorbar/defaults.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,11 +48,11 @@ module.exports = function colorbarDefaults(containerIn, containerOut, layout) {
4848

4949
if(isVertical) {
5050
defaultYAnchor = 'middle';
51-
defaultXAnchor = 'left';
51+
defaultXAnchor = isPaperX ? 'left' : 'right';
5252
defaultX = isPaperX ? 1.02 : 1;
5353
defaultY = 0.5;
5454
} else {
55-
defaultYAnchor = 'bottom';
55+
defaultYAnchor = isPaperY ? 'bottom' : 'top';
5656
defaultXAnchor = 'center';
5757
defaultX = 0.5;
5858
defaultY = isPaperY ? 1.02 : 1;

test/image/mocks/zz-container-colorbar.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
{
44
"colorbar": {
55
"orientation": "v",
6-
"xanchor": "right",
76
"xref": "container",
87
"thickness": 10,
98
"ticks": "outside",

0 commit comments

Comments
 (0)