Fix note text fitting for multiline support
This commit is contained in:
parent
d0654df19d
commit
e91cdfcac2
@ -108,7 +108,8 @@ function Note({
|
|||||||
const size = sizes.reduce((prev, curr) => {
|
const size = sizes.reduce((prev, curr) => {
|
||||||
text.fontSize(curr);
|
text.fontSize(curr);
|
||||||
const width = text.getTextWidth() + notePadding * 2;
|
const width = text.getTextWidth() + notePadding * 2;
|
||||||
if (width < noteWidth) {
|
const height = text.height() + notePadding * 2;
|
||||||
|
if (width < noteWidth && height < noteHeight) {
|
||||||
return curr;
|
return curr;
|
||||||
} else {
|
} else {
|
||||||
return prev;
|
return prev;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user