@@ -134,18 +134,18 @@ function calculateErrorParams(errors) {
134
134
}
135
135
136
136
function parseAlignmentX ( a ) {
137
- if ( a === null || a === undefined ) return 0 ;
138
- else if ( typeof ( a ) === 'number' ) return a ;
139
- else if ( a . indexOf ( 'left' ) > - 1 ) return - 1 ;
140
- else if ( a . indexOf ( 'right' ) > - 1 ) return 1 ;
137
+ if ( a === null || a === undefined ) return 0 ;
138
+ else if ( typeof ( a ) === 'number' ) return a ;
139
+ else if ( a . indexOf ( 'left' ) > - 1 ) return - 1 ;
140
+ else if ( a . indexOf ( 'right' ) > - 1 ) return 1 ;
141
141
return 0 ;
142
142
}
143
143
144
144
function parseAlignmentY ( a ) {
145
- if ( a === null || a === undefined ) return 0 ;
146
- else if ( typeof ( a ) === 'number' ) return a ;
147
- else if ( a . indexOf ( 'top' ) > - 1 ) return - 1 ;
148
- else if ( a . indexOf ( 'bottom' ) > - 1 ) return 1 ;
145
+ if ( a === null || a === undefined ) return 0 ;
146
+ else if ( typeof ( a ) === 'number' ) return a ;
147
+ else if ( a . indexOf ( 'top' ) > - 1 ) return - 1 ;
148
+ else if ( a . indexOf ( 'bottom' ) > - 1 ) return 1 ;
149
149
return 0 ;
150
150
}
151
151
@@ -161,12 +161,12 @@ function calculateTextOffset(tp) {
161
161
] ;
162
162
163
163
if ( Array . isArray ( tp ) ) {
164
- for ( var i = 0 ; i < tp . length ; i ++ ) {
164
+ for ( var i = 0 ; i < tp . length ; i ++ ) {
165
165
textOffset [ i ] = [
166
166
defaultAlignmentX ,
167
167
defaultAlignmentY
168
168
] ;
169
- if ( tp [ i ] ) {
169
+ if ( tp [ i ] ) {
170
170
textOffset [ i ] [ 0 ] = parseAlignmentX ( tp [ i ] ) ;
171
171
textOffset [ i ] [ 1 ] = parseAlignmentY ( tp [ i ] ) ;
172
172
}
0 commit comments