From 3b8bc17ab44520dc383c775b67c70f7d4387e568 Mon Sep 17 00:00:00 2001 From: Panayot Cankov Date: Thu, 23 Feb 2017 11:27:50 +0200 Subject: [PATCH] Fix the font properties to invalidate the layout in iOS --- tns-core-modules/ui/core/view-common.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tns-core-modules/ui/core/view-common.ts b/tns-core-modules/ui/core/view-common.ts index 271abf137..917a00de5 100644 --- a/tns-core-modules/ui/core/view-common.ts +++ b/tns-core-modules/ui/core/view-common.ts @@ -1950,7 +1950,7 @@ export const fontInternalProperty = new CssProperty({ name: "fontIn fontInternalProperty.register(Style); export const fontFamilyProperty = new InheritedCssProperty({ - name: "fontFamily", cssName: "font-family", valueChanged: (target, oldValue, newValue) => { + name: "fontFamily", cssName: "font-family", affectsLayout: isIOS, valueChanged: (target, oldValue, newValue) => { let currentFont = target.fontInternal; if (currentFont.fontFamily !== newValue) { const newFont = currentFont.withFontFamily(newValue); @@ -1961,7 +1961,7 @@ export const fontFamilyProperty = new InheritedCssProperty({ fontFamilyProperty.register(Style); export const fontSizeProperty = new InheritedCssProperty({ - name: "fontSize", cssName: "font-size", valueChanged: (target, oldValue, newValue) => { + name: "fontSize", cssName: "font-size", affectsLayout: isIOS, valueChanged: (target, oldValue, newValue) => { let currentFont = target.fontInternal; if (currentFont.fontSize !== newValue) { const newFont = currentFont.withFontSize(newValue); @@ -1973,7 +1973,7 @@ export const fontSizeProperty = new InheritedCssProperty({ fontSizeProperty.register(Style); export const fontStyleProperty = new InheritedCssProperty({ - name: "fontStyle", cssName: "font-style", defaultValue: FontStyle.NORMAL, valueConverter: FontStyle.parse, valueChanged: (target, oldValue, newValue) => { + name: "fontStyle", cssName: "font-style", affectsLayout: isIOS, defaultValue: FontStyle.NORMAL, valueConverter: FontStyle.parse, valueChanged: (target, oldValue, newValue) => { let currentFont = target.fontInternal; if (currentFont.fontStyle !== newValue) { const newFont = currentFont.withFontStyle(newValue); @@ -1984,7 +1984,7 @@ export const fontStyleProperty = new InheritedCssProperty({ fontStyleProperty.register(Style); export const fontWeightProperty = new InheritedCssProperty({ - name: "fontWeight", cssName: "font-weight", defaultValue: FontWeight.NORMAL, valueConverter: FontWeight.parse, valueChanged: (target, oldValue, newValue) => { + name: "fontWeight", cssName: "font-weight", affectsLayout: isIOS, defaultValue: FontWeight.NORMAL, valueConverter: FontWeight.parse, valueChanged: (target, oldValue, newValue) => { let currentFont = target.fontInternal; if (currentFont.fontWeight !== newValue) { const newFont = currentFont.withFontWeight(newValue);