@@ -1097,16 +1097,16 @@ describe('Title automargining', function() {
1097
1097
expect ( gd . _fullLayout . title . automargin ) . toBe ( true ) ;
1098
1098
expect ( gd . _fullLayout . title . y ) . toBe ( 1 ) ;
1099
1099
expect ( gd . _fullLayout . title . yanchor ) . toBe ( 'bottom' ) ;
1100
- expect ( gd . _fullLayout . _size . t ) . toBeCloseTo ( 33 , - 1 ) ;
1101
- expect ( gd . _fullLayout . _size . h ) . toBeCloseTo ( 267 , - 1 ) ;
1100
+ expect ( gd . _fullLayout . _size . t ) . toBeCloseTo ( 27 , - 1 ) ;
1101
+ expect ( gd . _fullLayout . _size . h ) . toBeCloseTo ( 273 , - 1 ) ;
1102
1102
return Plotly . relayout ( gd , 'title.pad.t' , 10 ) ;
1103
1103
} ) . then ( function ( ) {
1104
- expect ( gd . _fullLayout . _size . t ) . toBeCloseTo ( 43 , - 1 ) ;
1105
- expect ( gd . _fullLayout . _size . h ) . toBeCloseTo ( 257 , - 1 ) ;
1104
+ expect ( gd . _fullLayout . _size . t ) . toBeCloseTo ( 37 , - 1 ) ;
1105
+ expect ( gd . _fullLayout . _size . h ) . toBeCloseTo ( 263 , - 1 ) ;
1106
1106
return Plotly . relayout ( gd , 'title.pad.b' , 10 ) ;
1107
1107
} ) . then ( function ( ) {
1108
- expect ( gd . _fullLayout . _size . h ) . toBeCloseTo ( 247 , - 1 ) ;
1109
- expect ( gd . _fullLayout . _size . t ) . toBeCloseTo ( 53 , - 1 ) ;
1108
+ expect ( gd . _fullLayout . _size . h ) . toBeCloseTo ( 253 , - 1 ) ;
1109
+ expect ( gd . _fullLayout . _size . t ) . toBeCloseTo ( 47 , - 1 ) ;
1110
1110
return Plotly . relayout ( gd , 'title.yanchor' , 'top' ) ;
1111
1111
} ) . then ( function ( ) {
1112
1112
expect ( gd . _fullLayout . _size . t ) . toBe ( 0 ) ;
@@ -1127,8 +1127,8 @@ describe('Title automargining', function() {
1127
1127
} ) . then ( function ( ) {
1128
1128
return Plotly . relayout ( gd , { 'title.automargin' : true , 'title.y' : 0 } ) ;
1129
1129
} ) . then ( function ( ) {
1130
- expect ( gd . _fullLayout . _size . b ) . toBeCloseTo ( 33 , - 1 ) ;
1131
- expect ( gd . _fullLayout . _size . h ) . toBeCloseTo ( 267 , - 1 ) ;
1130
+ expect ( gd . _fullLayout . _size . b ) . toBeCloseTo ( 27 , - 1 ) ;
1131
+ expect ( gd . _fullLayout . _size . h ) . toBeCloseTo ( 273 , - 1 ) ;
1132
1132
expect ( gd . _fullLayout . title . yanchor ) . toBe ( 'top' ) ;
1133
1133
} ) . then ( done , done . fail ) ;
1134
1134
} ) ;
@@ -1145,14 +1145,14 @@ describe('Title automargining', function() {
1145
1145
automargin : true
1146
1146
}
1147
1147
} ) . then ( function ( ) {
1148
- expect ( gd . _fullLayout . _size . t ) . toBeCloseTo ( 33 , - 1 ) ;
1149
- expect ( gd . _fullLayout . _size . h ) . toBeCloseTo ( 267 , - 1 ) ;
1148
+ expect ( gd . _fullLayout . _size . t ) . toBeCloseTo ( 27 , - 1 ) ;
1149
+ expect ( gd . _fullLayout . _size . h ) . toBeCloseTo ( 273 , - 1 ) ;
1150
1150
expect ( gd . _fullLayout . title . y ) . toBe ( 1 ) ;
1151
1151
expect ( gd . _fullLayout . title . yanchor ) . toBe ( 'top' ) ;
1152
1152
return Plotly . relayout ( gd , 'title.y' , 0.6 ) ;
1153
1153
} ) . then ( function ( ) {
1154
- expect ( gd . _fullLayout . _size . t ) . toBeCloseTo ( 153 , - 1 ) ;
1155
- expect ( gd . _fullLayout . _size . h ) . toBeCloseTo ( 147 , - 1 ) ;
1154
+ expect ( gd . _fullLayout . _size . t ) . toBeCloseTo ( 147 , - 1 ) ;
1155
+ expect ( gd . _fullLayout . _size . h ) . toBeCloseTo ( 153 , - 1 ) ;
1156
1156
} ) . then ( done , done . fail ) ;
1157
1157
} ) ;
1158
1158
@@ -1173,8 +1173,8 @@ describe('Title automargining', function() {
1173
1173
y : 0
1174
1174
}
1175
1175
} ) . then ( function ( ) {
1176
- expect ( gd . _fullLayout . _size . b ) . toBeCloseTo ( 64 , - 1 ) ;
1177
- expect ( gd . _fullLayout . _size . h ) . toBeCloseTo ( 236 , - 1 ) ;
1176
+ expect ( gd . _fullLayout . _size . b ) . toBeCloseTo ( 57 , - 1 ) ;
1177
+ expect ( gd . _fullLayout . _size . h ) . toBeCloseTo ( 243 , - 1 ) ;
1178
1178
} ) . then ( done , done . fail ) ;
1179
1179
} ) ;
1180
1180
} ) ;
0 commit comments