diff options
| author | Michael Williamson <mike@zwobble.org> | 2014-09-27 09:19:04 +0100 |
|---|---|---|
| committer | Michael Williamson <mike@zwobble.org> | 2014-09-27 09:19:04 +0100 |
| commit | 34d5a5c2a120e7e4c45b790336d528e66e5464a3 (patch) | |
| tree | c6f2e32a36b59b499d885cb673732e5c8c1d18e8 /lib/documents.js | |
| parent | b69b70a375d0975c15546b66e9177ade4525d88e (diff) | |
Add default vertical alignment to runs
Diffstat (limited to 'lib/documents.js')
| -rw-r--r-- | lib/documents.js | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/lib/documents.js b/lib/documents.js index c26c76a..b0959cc 100644 --- a/lib/documents.js +++ b/lib/documents.js @@ -44,10 +44,17 @@ function Run(children, properties) { styleName: properties.styleName || null, isBold: properties.isBold, isUnderline: properties.isUnderline, - isItalic: properties.isItalic + isItalic: properties.isItalic, + verticalAlignment: properties.verticalAlignment || verticalAlignment.baseline }; } +var verticalAlignment = { + baseline: "baseline", + superscript: "superscript", + subscript: "subscript" +}; + function Text(value) { return { type: types.text, @@ -142,3 +149,5 @@ exports.Table = Table; exports.TableRow = TableRow; exports.TableCell = TableCell; exports.LineBreak = LineBreak; + +exports.verticalAlignment = verticalAlignment; |
