@@ -11,7 +11,7 @@ module.exports = function handlePositionDefaults(containerIn, containerOut, coer
11
11
var letter = options . letter ;
12
12
var grid = options . grid ;
13
13
var overlayingDomain = options . overlayingDomain ;
14
- var dfltAnchor , dfltDomain , dfltSide , dfltPosition , dfltAutoshift , dfltShift , dfltAutomargin ;
14
+ var dfltAnchor , dfltDomain , dfltSide , dfltPosition , dfltShift , dfltAutomargin ;
15
15
16
16
if ( grid ) {
17
17
dfltDomain = grid . _domains [ letter ] [ grid . _axisMap [ containerOut . _id ] ] ;
@@ -27,9 +27,8 @@ module.exports = function handlePositionDefaults(containerIn, containerOut, coer
27
27
dfltAnchor = dfltAnchor || ( isNumeric ( containerIn . position ) ? 'free' : ( counterAxes [ 0 ] || 'free' ) ) ;
28
28
dfltSide = dfltSide || ( letter === 'x' ? 'bottom' : 'left' ) ;
29
29
dfltPosition = dfltPosition || 0 ;
30
- dfltAutoshift = dfltAutoshift || false ;
31
- dfltShift = dfltShift || 0 ;
32
- dfltAutomargin = dfltAutomargin || false ;
30
+ dfltShift = 0 ;
31
+ dfltAutomargin = false ;
33
32
34
33
var anchor = Lib . coerce ( containerIn , containerOut , {
35
34
anchor : {
@@ -48,14 +47,16 @@ module.exports = function handlePositionDefaults(containerIn, containerOut, coer
48
47
} , 'side' ) ;
49
48
50
49
if ( anchor === 'free' ) {
51
- var autoshift = coerce ( 'autoshift' , dfltAutoshift ) ;
52
- if ( autoshift === true ) {
53
- dfltPosition = side === 'left' ? overlayingDomain [ 0 ] : overlayingDomain [ 1 ] ;
54
- dfltAutomargin = containerOut . automargin ? containerOut . automargin : true ;
55
- dfltShift = side === 'left' ? - 3 : 3 ;
50
+ if ( letter === 'y' ) {
51
+ var autoshift = coerce ( 'autoshift' ) ;
52
+ if ( autoshift === true ) {
53
+ dfltPosition = side === 'left' ? overlayingDomain [ 0 ] : overlayingDomain [ 1 ] ;
54
+ dfltAutomargin = containerOut . automargin ? containerOut . automargin : true ;
55
+ dfltShift = side === 'left' ? - 3 : 3 ;
56
+ }
57
+ coerce ( 'shift' , dfltShift ) ;
56
58
}
57
59
coerce ( 'position' , dfltPosition ) ;
58
- coerce ( 'shift' , dfltShift ) ;
59
60
}
60
61
coerce ( 'automargin' , dfltAutomargin ) ;
61
62
0 commit comments