UNPKG
async-pdf
Version:
latest (0.2.1)
0.2.1
0.2.0
0.1.9
0.1.7
0.1.5
0.1.4
0.0.1
Create, Modify and Merge PDF Files
github.com/pereirasamueljp/async-pdf
pereirasamueljp/async-pdf
async-pdf
/
es
/
utils
/
verticalAlignmentFormatter.js
14 lines
(13 loc)
•
342 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
13
14
export
function
PDFVerticalAlignmentFormatter
(
align, position, size
) {
switch
(align) {
case
'center'
: position = position - (size /
2
);
break
;
case
'left'
:
break
;
case
'right'
: position = position - size;
break
;
default
:
break
; }
return
position; }