Fix label ellipsis issue on zoomed iPhone 6 Plus.

Fix Image.imageSource propertyMetadata to affects layout.
This commit is contained in:
hshristov
2015-04-02 15:43:04 +03:00
parent d2160f7aa8
commit b27c05e52c
5 changed files with 30 additions and 7 deletions

View File

@@ -249,3 +249,8 @@ export var test_SettingStretch_none = function () {
helper.buildUIAndRunTest(image, testFunc);
}
export var test_src_property_affects_layout = function () {
var sourceProperty = ImageModule.Image.imageSourceProperty;
TKUnit.assertEqual(sourceProperty.metadata.affectsLayout, true, "sourceProperty should invalidate layout");
}

View File

@@ -87,6 +87,24 @@ export var test_Set_Text_Native = function () {
helper.buildUIAndRunTest(label, test);
}
export var test_measuredWidth_is_not_clipped = function () {
var label = new LabelModule.Label();
label.horizontalAlignment = "left";
label.text = "i";
label.fontSize = 9;
var test = function (views: Array<view.View>) {
TKUnit.waitUntilReady(() => { return label.isLayoutValid; });
var expectedValue = 3;
var measuredWidth = label.getMeasuredWidth();
TKUnit.assertEqual(measuredWidth, expectedValue, "measuredWidth should not be rounded down.");
}
helper.buildUIAndRunTest(label, test);
}
export var test_Set_TextWrap_TNS = function () {
// <snippet module="ui/label" title="Label">
// ### How to turn on text wrapping for a label