Skip to content

Commit 62eebb3

Browse files
evanwasherehhatto
andcommitted
backport TextLayout types fix
Co-Authored-By: Hideo Hattori <hhatto.jp@gmail.com>
1 parent 0861658 commit 62eebb3

2 files changed

Lines changed: 4 additions & 3 deletions

File tree

‎.gitignore‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
old/
22
.idea/
3-
.nyc_output/
43
coverage/
4+
.DS_Store
5+
.nyc_output/
56
.node_modules/

‎ImageScript.js‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1485,7 +1485,7 @@ export class GIF extends Array {
14851485
}
14861486
}
14871487

1488-
class TextLayout {
1488+
export class TextLayout {
14891489
/**
14901490
* Layout options for {@link renderText}
14911491
* @param {object} options
@@ -1494,7 +1494,7 @@ class TextLayout {
14941494
* @param {string} [options.wrapStyle='string'] The texts wrap style when reaching the max width (word, char)
14951495
* @param {string} [options.verticalAlign='left'] The vertical align mode (left, center, right)
14961496
* @param {string} [options.horizontalAlign='top'] The horizontal align mode (top, middle, bottom)
1497-
* @param {string} [options.wrapHardBreaks=true] Whether to force wrap at new line characters
1497+
* @param {boolean} [options.wrapHardBreaks=true] Whether to force wrap at new line characters
14981498
*/
14991499
constructor(options) {
15001500
const {maxWidth, maxHeight, wrapStyle, verticalAlign, horizontalAlign, wrapHardBreaks} = options ?? {};

0 commit comments

Comments
 (0)