mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
Fix label ellipsis issue on zoomed iPhone 6 Plus.
Fix Image.imageSource propertyMetadata to affects layout.
This commit is contained in:
@@ -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");
|
||||
}
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user