mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-15 11:01:21 +08:00
refactor: address a comment
This commit is contained in:
@ -210,8 +210,10 @@ export class TextBase extends TextBaseCommon {
|
|||||||
const string = (text === undefined || text === null) ? "" : text.toString();
|
const string = (text === undefined || text === null) ? "" : text.toString();
|
||||||
const source = getTransformedText(string, this.textTransform);
|
const source = getTransformedText(string, this.textTransform);
|
||||||
if (dict.size > 0 || isTextView) {
|
if (dict.size > 0 || isTextView) {
|
||||||
// UITextView's font seems to change inside.
|
if (isTextView) {
|
||||||
dict.set(NSFontAttributeName, this.nativeTextViewProtected.font);
|
// UITextView's font seems to change inside.
|
||||||
|
dict.set(NSFontAttributeName, this.nativeTextViewProtected.font);
|
||||||
|
}
|
||||||
|
|
||||||
const result = NSMutableAttributedString.alloc().initWithString(source);
|
const result = NSMutableAttributedString.alloc().initWithString(source);
|
||||||
result.setAttributesRange(<any>dict, { location: 0, length: source.length });
|
result.setAttributesRange(<any>dict, { location: 0, length: source.length });
|
||||||
|
Reference in New Issue
Block a user