Skip to content

Commit 618bd55

Browse files
committed
fix: more autofontsize fixes
1 parent 20e1ffa commit 618bd55

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/label.ios.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -827,9 +827,9 @@ export class Label extends LabelBase {
827827
}
828828

829829
const textViewSize = textView.frame.size;
830-
const fixedWidth = width || textViewSize.width;
831-
const fixedHeight = height || textViewSize.height;
832-
if (fixedWidth === 0 && fixedHeight === 0) {
830+
const fixedWidth = width !== undefined ? width : textViewSize.width;
831+
const fixedHeight = height !== undefined ? height : textViewSize.height;
832+
if (fixedWidth === 0 || fixedHeight === 0) {
833833
return;
834834
}
835835
const nbLines = textView.textContainer.maximumNumberOfLines;
@@ -895,7 +895,7 @@ export class Label extends LabelBase {
895895
}
896896
}
897897
[autoFontSizeProperty.setNative](value: boolean) {
898-
if (value && this.text) {
898+
if (value && (this.text || this.html)) {
899899
this.textViewDidChange(this.nativeTextViewProtected);
900900
} else {
901901
this[fontInternalProperty.setNative](this.style.fontInternal);

0 commit comments

Comments
 (0)