mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
grid-layout distribute remaining space over stars but preserve their aspect.
ts lint errors fixed android scroll-view tests fixed for different device density added grid-layout test
This commit is contained in:
@@ -689,25 +689,36 @@ export class GridLayoutTest extends testModule.UITest<GridLayout> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public test_columns_widths() {
|
public test_columns_widths() {
|
||||||
this.testView.width = layoutHelper.dp(300);
|
this.testView.width = layoutHelper.dp(400);
|
||||||
this.testView.height = layoutHelper.dp(500);
|
this.testView.height = layoutHelper.dp(600);
|
||||||
|
|
||||||
this.testView.addColumn(new ItemSpec(1, GridUnitType.star));
|
let grid = new GridLayout();
|
||||||
this.testView.addColumn(new ItemSpec(layoutHelper.dp(100), GridUnitType.pixel));
|
this.testView.addChild(grid);
|
||||||
this.testView.addColumn(new ItemSpec(2, GridUnitType.star));
|
grid.horizontalAlignment = enums.HorizontalAlignment.left;
|
||||||
|
grid.verticalAlignment = enums.VerticalAlignment.top;
|
||||||
this.testView.addRow(new ItemSpec(1, GridUnitType.star));
|
|
||||||
this.testView.addRow(new ItemSpec(layoutHelper.dp(100), GridUnitType.pixel));
|
grid.addColumn(new ItemSpec(1, GridUnitType.star));
|
||||||
this.testView.addRow(new ItemSpec(2, GridUnitType.star));
|
grid.addColumn(new ItemSpec(layoutHelper.dp(100), GridUnitType.pixel));
|
||||||
|
grid.addColumn(new ItemSpec(2, GridUnitType.star));
|
||||||
|
|
||||||
|
grid.addRow(new ItemSpec(1, GridUnitType.star));
|
||||||
|
grid.addRow(new ItemSpec(layoutHelper.dp(100), GridUnitType.pixel));
|
||||||
|
grid.addRow(new ItemSpec(2, GridUnitType.star));
|
||||||
|
|
||||||
|
let btn = new Button();
|
||||||
|
btn.width = layoutHelper.dp(300);
|
||||||
|
btn.height = layoutHelper.dp(500);
|
||||||
|
grid.addChild(btn);
|
||||||
|
GridLayout.setColumnSpan(btn, 3);
|
||||||
|
GridLayout.setRowSpan(btn, 3);
|
||||||
this.waitUntilTestElementLayoutIsValid();
|
this.waitUntilTestElementLayoutIsValid();
|
||||||
|
|
||||||
var cols = this.testView.getColumns();
|
var cols = grid.getColumns();
|
||||||
TKUnit.assertAreClose(cols[0].actualLength, layoutHelper.dp(67), DELTA, "Column[0] actual length should be 67");
|
TKUnit.assertAreClose(cols[0].actualLength, layoutHelper.dp(67), DELTA, "Column[0] actual length should be 67");
|
||||||
TKUnit.assertAreClose(cols[1].actualLength, layoutHelper.dp(100), DELTA, "Column[1] actual length should be 100");
|
TKUnit.assertAreClose(cols[1].actualLength, layoutHelper.dp(100), DELTA, "Column[1] actual length should be 100");
|
||||||
TKUnit.assertAreClose(cols[2].actualLength, layoutHelper.dp(133), DELTA, "Column[2] actual length should be 133");
|
TKUnit.assertAreClose(cols[2].actualLength, layoutHelper.dp(133), DELTA, "Column[2] actual length should be 133");
|
||||||
|
|
||||||
var rows = this.testView.getRows();
|
var rows = grid.getRows();
|
||||||
TKUnit.assertAreClose(rows[0].actualLength, layoutHelper.dp(133), DELTA, "Row[0] actual length should be 133");
|
TKUnit.assertAreClose(rows[0].actualLength, layoutHelper.dp(133), DELTA, "Row[0] actual length should be 133");
|
||||||
TKUnit.assertAreClose(rows[1].actualLength, layoutHelper.dp(100), DELTA, "Row[1] actual length should be 100");
|
TKUnit.assertAreClose(rows[1].actualLength, layoutHelper.dp(100), DELTA, "Row[1] actual length should be 100");
|
||||||
TKUnit.assertAreClose(rows[2].actualLength, layoutHelper.dp(267), DELTA, "Row[2] actual length should be 267");
|
TKUnit.assertAreClose(rows[2].actualLength, layoutHelper.dp(267), DELTA, "Row[2] actual length should be 267");
|
||||||
|
|||||||
@@ -27,8 +27,21 @@ import scrollViewModule = require("ui/scroll-view");
|
|||||||
// </snippet>
|
// </snippet>
|
||||||
|
|
||||||
class ScrollLayoutTest extends testModule.UITest<scrollViewModule.ScrollView> {
|
class ScrollLayoutTest extends testModule.UITest<scrollViewModule.ScrollView> {
|
||||||
|
|
||||||
public create(): scrollViewModule.ScrollView {
|
public create(): scrollViewModule.ScrollView {
|
||||||
return new scrollViewModule.ScrollView();
|
let scrollView = new scrollViewModule.ScrollView();
|
||||||
|
scrollView.orientation = enums.Orientation.vertical;
|
||||||
|
|
||||||
|
scrollView.width = layoutHelper.dp(200);
|
||||||
|
scrollView.height = layoutHelper.dp(300);
|
||||||
|
|
||||||
|
let btn = new button.Button();
|
||||||
|
btn.text = "test";
|
||||||
|
btn.width = layoutHelper.dp(500);
|
||||||
|
btn.height = layoutHelper.dp(500);
|
||||||
|
scrollView.content = btn;
|
||||||
|
|
||||||
|
return scrollView;
|
||||||
}
|
}
|
||||||
|
|
||||||
public test_snippets() {
|
public test_snippets() {
|
||||||
@@ -69,78 +82,38 @@ class ScrollLayoutTest extends testModule.UITest<scrollViewModule.ScrollView> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public test_scrollabeHeight_vertical_orientation_when_content_is_small() {
|
public test_scrollabeHeight_vertical_orientation_when_content_is_small() {
|
||||||
this.testView.orientation = enums.Orientation.vertical;
|
this.testView.content.height = 100;
|
||||||
this.testView.width = 200;
|
|
||||||
this.testView.height = 300;
|
|
||||||
|
|
||||||
let btn = new button.Button();
|
|
||||||
btn.text = "test";
|
|
||||||
btn.height = 100;
|
|
||||||
this.testView.content = btn;
|
|
||||||
|
|
||||||
this.waitUntilTestElementLayoutIsValid();
|
this.waitUntilTestElementLayoutIsValid();
|
||||||
|
|
||||||
TKUnit.assertEqual(this.testView.scrollableHeight, 0, "this.testView.scrollableHeight");
|
TKUnit.assertEqual(this.testView.scrollableHeight, 0, "this.testView.scrollableHeight");
|
||||||
TKUnit.assertEqual(this.testView.scrollableWidth, 0, "this.testView.scrollableWidth");
|
TKUnit.assertEqual(this.testView.scrollableWidth, 0, "this.testView.scrollableWidth");
|
||||||
}
|
}
|
||||||
|
|
||||||
public test_scrollabeHeight_vertical_orientation_when_content_is_big() {
|
public test_scrollabeHeight_vertical_orientation_when_content_is_big() {
|
||||||
this.testView.orientation = enums.Orientation.vertical;
|
|
||||||
|
|
||||||
this.testView.width = 200;
|
|
||||||
this.testView.height = 300;
|
|
||||||
|
|
||||||
let btn = new button.Button();
|
|
||||||
btn.text = "test";
|
|
||||||
btn.height = 500;
|
|
||||||
this.testView.content = btn;
|
|
||||||
|
|
||||||
this.waitUntilTestElementLayoutIsValid();
|
this.waitUntilTestElementLayoutIsValid();
|
||||||
TKUnit.assertAreClose(this.testView.scrollableHeight, 200, 0.4, "this.testView.scrollableHeight");
|
|
||||||
TKUnit.assertEqual(this.testView.scrollableWidth, 0, "this.testView.scrollableWidth");
|
|
||||||
|
|
||||||
|
TKUnit.assertAreClose(layoutHelper.dip(this.testView.scrollableHeight), 200, 0.4, "this.testView.scrollableHeight");
|
||||||
|
TKUnit.assertEqual(this.testView.scrollableWidth, 0, "this.testView.scrollableWidth");
|
||||||
}
|
}
|
||||||
|
|
||||||
public test_scrollabeWidth_horizontal_orientation_when_content_is_small() {
|
public test_scrollabeWidth_horizontal_orientation_when_content_is_small() {
|
||||||
this.testView.orientation = enums.Orientation.vertical;
|
this.testView.orientation = enums.Orientation.horizontal;
|
||||||
this.testView.width = 200;
|
this.testView.content.width = 100;
|
||||||
this.testView.height = 300;
|
|
||||||
|
|
||||||
let btn = new button.Button();
|
|
||||||
btn.text = "test";
|
|
||||||
btn.width = 100;
|
|
||||||
this.testView.content = btn;
|
|
||||||
|
|
||||||
this.waitUntilTestElementLayoutIsValid();
|
this.waitUntilTestElementLayoutIsValid();
|
||||||
|
|
||||||
TKUnit.assertEqual(this.testView.scrollableHeight, 0, "this.testView.scrollableHeight");
|
TKUnit.assertEqual(this.testView.scrollableHeight, 0, "this.testView.scrollableHeight");
|
||||||
TKUnit.assertEqual(this.testView.scrollableWidth, 0, "this.testView.scrollableWidth");
|
TKUnit.assertEqual(this.testView.scrollableWidth, 0, "this.testView.scrollableWidth");
|
||||||
}
|
}
|
||||||
|
|
||||||
public test_scrollabeWidth_horizontal_orientation_when_content_is_big() {
|
public test_scrollabeWidth_horizontal_orientation_when_content_is_big() {
|
||||||
this.testView.orientation = enums.Orientation.horizontal;
|
this.testView.orientation = enums.Orientation.horizontal;
|
||||||
|
|
||||||
this.testView.width = 200;
|
|
||||||
this.testView.height = 300;
|
|
||||||
|
|
||||||
let btn = new button.Button();
|
|
||||||
btn.text = "test";
|
|
||||||
btn.width = 500;
|
|
||||||
this.testView.content = btn;
|
|
||||||
|
|
||||||
this.waitUntilTestElementLayoutIsValid();
|
this.waitUntilTestElementLayoutIsValid();
|
||||||
|
|
||||||
TKUnit.assertEqual(this.testView.scrollableHeight, 0, "this.testView.scrollableHeight");
|
TKUnit.assertEqual(this.testView.scrollableHeight, 0, "this.testView.scrollableHeight");
|
||||||
TKUnit.assertAreClose(this.testView.scrollableWidth, 300, 0.4, "this.testView.scrollableWidth");
|
TKUnit.assertAreClose(layoutHelper.dip(this.testView.scrollableWidth), 300, 0.4, "this.testView.scrollableWidth");
|
||||||
}
|
}
|
||||||
|
|
||||||
public test_scrollToVerticalOffset_no_animation() {
|
public test_scrollToVerticalOffset_no_animation() {
|
||||||
this.testView.orientation = enums.Orientation.vertical;
|
|
||||||
|
|
||||||
this.testView.width = 200;
|
|
||||||
this.testView.height = 300;
|
|
||||||
|
|
||||||
let btn = new button.Button();
|
|
||||||
btn.text = "test";
|
|
||||||
btn.height = 500;
|
|
||||||
this.testView.content = btn;
|
|
||||||
this.waitUntilTestElementLayoutIsValid();
|
this.waitUntilTestElementLayoutIsValid();
|
||||||
|
|
||||||
TKUnit.assertEqual(this.testView.verticalOffset, 0, "this.testView.verticalOffset");
|
TKUnit.assertEqual(this.testView.verticalOffset, 0, "this.testView.verticalOffset");
|
||||||
@@ -149,15 +122,6 @@ class ScrollLayoutTest extends testModule.UITest<scrollViewModule.ScrollView> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public test_scrollToVerticalOffset_with_animation() {
|
public test_scrollToVerticalOffset_with_animation() {
|
||||||
this.testView.orientation = enums.Orientation.vertical;
|
|
||||||
|
|
||||||
this.testView.width = 200;
|
|
||||||
this.testView.height = 300;
|
|
||||||
|
|
||||||
let btn = new button.Button();
|
|
||||||
btn.text = "test";
|
|
||||||
btn.height = 500;
|
|
||||||
this.testView.content = btn;
|
|
||||||
this.waitUntilTestElementLayoutIsValid();
|
this.waitUntilTestElementLayoutIsValid();
|
||||||
|
|
||||||
TKUnit.assertEqual(this.testView.verticalOffset, 0, "this.testView.verticalOffset");
|
TKUnit.assertEqual(this.testView.verticalOffset, 0, "this.testView.verticalOffset");
|
||||||
@@ -174,14 +138,6 @@ class ScrollLayoutTest extends testModule.UITest<scrollViewModule.ScrollView> {
|
|||||||
|
|
||||||
public test_scrollToHorizontalOffset_no_animation() {
|
public test_scrollToHorizontalOffset_no_animation() {
|
||||||
this.testView.orientation = enums.Orientation.horizontal;
|
this.testView.orientation = enums.Orientation.horizontal;
|
||||||
|
|
||||||
this.testView.width = 200;
|
|
||||||
this.testView.height = 300;
|
|
||||||
|
|
||||||
let btn = new button.Button();
|
|
||||||
btn.text = "test";
|
|
||||||
btn.width = 500;
|
|
||||||
this.testView.content = btn;
|
|
||||||
this.waitUntilTestElementLayoutIsValid();
|
this.waitUntilTestElementLayoutIsValid();
|
||||||
|
|
||||||
TKUnit.assertEqual(this.testView.horizontalOffset, 0, "this.testView.horizontalOffset");
|
TKUnit.assertEqual(this.testView.horizontalOffset, 0, "this.testView.horizontalOffset");
|
||||||
@@ -191,14 +147,6 @@ class ScrollLayoutTest extends testModule.UITest<scrollViewModule.ScrollView> {
|
|||||||
|
|
||||||
public test_scrollToHorizontalOffset_with_animation() {
|
public test_scrollToHorizontalOffset_with_animation() {
|
||||||
this.testView.orientation = enums.Orientation.horizontal;
|
this.testView.orientation = enums.Orientation.horizontal;
|
||||||
|
|
||||||
this.testView.width = 200;
|
|
||||||
this.testView.height = 300;
|
|
||||||
|
|
||||||
let btn = new button.Button();
|
|
||||||
btn.text = "test";
|
|
||||||
btn.width = 500;
|
|
||||||
this.testView.content = btn;
|
|
||||||
this.waitUntilTestElementLayoutIsValid();
|
this.waitUntilTestElementLayoutIsValid();
|
||||||
|
|
||||||
TKUnit.assertEqual(this.testView.horizontalOffset, 0, "this.testView.horizontalOffset");
|
TKUnit.assertEqual(this.testView.horizontalOffset, 0, "this.testView.horizontalOffset");
|
||||||
@@ -214,19 +162,9 @@ class ScrollLayoutTest extends testModule.UITest<scrollViewModule.ScrollView> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public test_scrollView_persistsState_vertical() {
|
public test_scrollView_persistsState_vertical() {
|
||||||
this.testView.orientation = enums.Orientation.vertical;
|
|
||||||
|
|
||||||
this.testView.width = 200;
|
|
||||||
this.testView.height = 300;
|
|
||||||
|
|
||||||
var btn = new button.Button();
|
|
||||||
btn.text = "test";
|
|
||||||
btn.height = 500;
|
|
||||||
this.testView.content = btn;
|
|
||||||
this.waitUntilTestElementLayoutIsValid();
|
this.waitUntilTestElementLayoutIsValid();
|
||||||
|
|
||||||
this.testView.scrollToVerticalOffset(layoutHelper.dp(100), false);
|
this.testView.scrollToVerticalOffset(layoutHelper.dp(100), false);
|
||||||
|
|
||||||
TKUnit.assertAreClose(layoutHelper.dip(this.testView.verticalOffset), 100, 0.1, "this.testView.verticalOffset before navigation");
|
TKUnit.assertAreClose(layoutHelper.dip(this.testView.verticalOffset), 100, 0.1, "this.testView.verticalOffset before navigation");
|
||||||
|
|
||||||
helper.do_PageTest_WithButton((t) => {
|
helper.do_PageTest_WithButton((t) => {
|
||||||
@@ -242,14 +180,6 @@ class ScrollLayoutTest extends testModule.UITest<scrollViewModule.ScrollView> {
|
|||||||
|
|
||||||
public test_scrollView_persistsState_horizontal() {
|
public test_scrollView_persistsState_horizontal() {
|
||||||
this.testView.orientation = enums.Orientation.horizontal;
|
this.testView.orientation = enums.Orientation.horizontal;
|
||||||
|
|
||||||
this.testView.width = 200;
|
|
||||||
this.testView.height = 300;
|
|
||||||
|
|
||||||
var btn = new button.Button();
|
|
||||||
btn.text = "test";
|
|
||||||
btn.width = 500;
|
|
||||||
this.testView.content = btn;
|
|
||||||
this.waitUntilTestElementLayoutIsValid();
|
this.waitUntilTestElementLayoutIsValid();
|
||||||
|
|
||||||
this.testView.scrollToHorizontalOffset(layoutHelper.dp(100), false);
|
this.testView.scrollToHorizontalOffset(layoutHelper.dp(100), false);
|
||||||
@@ -268,23 +198,14 @@ class ScrollLayoutTest extends testModule.UITest<scrollViewModule.ScrollView> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public test_scrollView_vertical_raised_scroll_event() {
|
public test_scrollView_vertical_raised_scroll_event() {
|
||||||
this.testView.orientation = enums.Orientation.vertical;
|
|
||||||
|
|
||||||
var scrollY: number;
|
var scrollY: number;
|
||||||
this.testView.on(scrollViewModule.ScrollView.scrollEvent, (args: scrollViewModule.ScrollEventData) => {
|
this.testView.on(scrollViewModule.ScrollView.scrollEvent, (args: scrollViewModule.ScrollEventData) => {
|
||||||
scrollY = args.scrollY;
|
scrollY = args.scrollY;
|
||||||
});
|
});
|
||||||
|
|
||||||
this.testView.width = 200;
|
|
||||||
this.testView.height = 300;
|
|
||||||
|
|
||||||
var btn = new button.Button();
|
|
||||||
btn.text = "test";
|
|
||||||
btn.height = 500;
|
|
||||||
this.testView.content = btn;
|
|
||||||
this.waitUntilTestElementLayoutIsValid();
|
this.waitUntilTestElementLayoutIsValid();
|
||||||
|
|
||||||
this.testView.scrollToVerticalOffset(100, false);
|
this.testView.scrollToVerticalOffset(layoutHelper.dp(100), false);
|
||||||
TKUnit.waitUntilReady(function () { return scrollY > 0; });
|
TKUnit.waitUntilReady(function () { return scrollY > 0; });
|
||||||
TKUnit.assertEqual(scrollY, this.testView.verticalOffset);
|
TKUnit.assertEqual(scrollY, this.testView.verticalOffset);
|
||||||
}
|
}
|
||||||
@@ -297,23 +218,14 @@ class ScrollLayoutTest extends testModule.UITest<scrollViewModule.ScrollView> {
|
|||||||
scrollX = args.scrollX;
|
scrollX = args.scrollX;
|
||||||
});
|
});
|
||||||
|
|
||||||
this.testView.width = 200;
|
|
||||||
this.testView.height = 300;
|
|
||||||
|
|
||||||
var btn = new button.Button();
|
|
||||||
btn.text = "test";
|
|
||||||
btn.width = 500;
|
|
||||||
this.testView.content = btn;
|
|
||||||
this.waitUntilTestElementLayoutIsValid();
|
this.waitUntilTestElementLayoutIsValid();
|
||||||
|
|
||||||
this.testView.scrollToHorizontalOffset(100, false);
|
this.testView.scrollToHorizontalOffset(layoutHelper.dp(100), false);
|
||||||
TKUnit.waitUntilReady(function () { return scrollX > 0; });
|
TKUnit.waitUntilReady(function () { return scrollX > 0; });
|
||||||
TKUnit.assertEqual(scrollX, this.testView.horizontalOffset);
|
TKUnit.assertEqual(scrollX, this.testView.horizontalOffset);
|
||||||
}
|
}
|
||||||
|
|
||||||
public test_scrollView_vertical_raised_scroll_event_after_loaded() {
|
public test_scrollView_vertical_raised_scroll_event_after_loaded() {
|
||||||
this.testView.orientation = enums.Orientation.vertical;
|
|
||||||
|
|
||||||
this.waitUntilTestElementIsLoaded();
|
this.waitUntilTestElementIsLoaded();
|
||||||
|
|
||||||
var scrollY: number;
|
var scrollY: number;
|
||||||
@@ -321,23 +233,14 @@ class ScrollLayoutTest extends testModule.UITest<scrollViewModule.ScrollView> {
|
|||||||
scrollY = args.scrollY;
|
scrollY = args.scrollY;
|
||||||
});
|
});
|
||||||
|
|
||||||
this.testView.width = 200;
|
this.testView.scrollToVerticalOffset(layoutHelper.dp(100), false);
|
||||||
this.testView.height = 300;
|
|
||||||
|
|
||||||
var btn = new button.Button();
|
|
||||||
btn.text = "test";
|
|
||||||
btn.height = 500;
|
|
||||||
this.testView.content = btn;
|
|
||||||
this.waitUntilTestElementLayoutIsValid();
|
|
||||||
|
|
||||||
this.testView.scrollToVerticalOffset(100, false);
|
|
||||||
TKUnit.waitUntilReady(function () { return scrollY > 0; });
|
TKUnit.waitUntilReady(function () { return scrollY > 0; });
|
||||||
TKUnit.assertEqual(scrollY, this.testView.verticalOffset);
|
TKUnit.assertEqual(scrollY, this.testView.verticalOffset);
|
||||||
|
TKUnit.assertEqual(scrollY, layoutHelper.dp(100));
|
||||||
}
|
}
|
||||||
|
|
||||||
public test_scrollView_horizontal_raised_scroll_event_after_loaded() {
|
public test_scrollView_horizontal_raised_scroll_event_after_loaded() {
|
||||||
this.testView.orientation = enums.Orientation.horizontal;
|
this.testView.orientation = enums.Orientation.horizontal;
|
||||||
|
|
||||||
this.waitUntilTestElementIsLoaded();
|
this.waitUntilTestElementIsLoaded();
|
||||||
|
|
||||||
var scrollX: number;
|
var scrollX: number;
|
||||||
@@ -345,18 +248,12 @@ class ScrollLayoutTest extends testModule.UITest<scrollViewModule.ScrollView> {
|
|||||||
scrollX = args.scrollX;
|
scrollX = args.scrollX;
|
||||||
});
|
});
|
||||||
|
|
||||||
this.testView.width = 200;
|
|
||||||
this.testView.height = 300;
|
|
||||||
|
|
||||||
var btn = new button.Button();
|
|
||||||
btn.text = "test";
|
|
||||||
btn.width = 500;
|
|
||||||
this.testView.content = btn;
|
|
||||||
this.waitUntilTestElementLayoutIsValid();
|
this.waitUntilTestElementLayoutIsValid();
|
||||||
|
|
||||||
this.testView.scrollToHorizontalOffset(100, false);
|
this.testView.scrollToHorizontalOffset(layoutHelper.dp(100), false);
|
||||||
TKUnit.waitUntilReady(function () { return scrollX > 0; });
|
TKUnit.waitUntilReady(function () { return scrollX > 0; });
|
||||||
TKUnit.assertEqual(scrollX, this.testView.horizontalOffset);
|
TKUnit.assertEqual(scrollX, this.testView.horizontalOffset);
|
||||||
|
TKUnit.assertEqual(scrollX, layoutHelper.dp(100));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -749,13 +749,13 @@ class MeasureHelper {
|
|||||||
|
|
||||||
// If we are not stretched and minColumnStarValue is less than maxColumnStarValue
|
// If we are not stretched and minColumnStarValue is less than maxColumnStarValue
|
||||||
// we need to reduce the width of star columns.
|
// we need to reduce the width of star columns.
|
||||||
if (!this.stretchedHorizontally && this.minColumnStarValue != -1 && this.minColumnStarValue < this.maxColumnStarValue) {
|
if (!this.stretchedHorizontally && this.minColumnStarValue !== -1 && this.minColumnStarValue < this.maxColumnStarValue) {
|
||||||
MeasureHelper.updateStarLength(this.columns, this.minColumnStarValue);
|
MeasureHelper.updateStarLength(this.columns, this.minColumnStarValue);
|
||||||
}
|
}
|
||||||
|
|
||||||
// If we are not stretched and minRowStarValue is less than maxRowStarValue
|
// If we are not stretched and minRowStarValue is less than maxRowStarValue
|
||||||
// we need to reduce the height of star maxRowStarValue.
|
// we need to reduce the height of star maxRowStarValue.
|
||||||
if (!this.stretchedVertically && this.minRowStarValue != -1 && this.minRowStarValue < this.maxRowStarValue) {
|
if (!this.stretchedVertically && this.minRowStarValue !== -1 && this.minRowStarValue < this.maxRowStarValue) {
|
||||||
MeasureHelper.updateStarLength(this.rows, this.minRowStarValue);
|
MeasureHelper.updateStarLength(this.rows, this.minRowStarValue);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user