Provide RTL support for RCTShadowView according to new csslayout
Summary: @public The make current RCTShadowView support RTL layout. 1 Change all left/right to start/end for margin, padding, boarder and position 2 Calculate position in the same way as margin, padding and boarder Reviewed By: fkgozali Differential Revision: D3619292 fbshipit-source-id: eaaa6faeee93c964d59bb6f498d89effc09ed567
This commit is contained in:
committed by
Facebook Github Bot 6
parent
5e7d95b403
commit
5207b90420
@@ -378,11 +378,11 @@ public class CSSNode {
|
|||||||
/**
|
/**
|
||||||
* Get this node's position, as defined by style.
|
* Get this node's position, as defined by style.
|
||||||
*/
|
*/
|
||||||
public Spacing getPosition() {
|
public Spacing getPositionValue() {
|
||||||
return style.position;
|
return style.position;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setPosition(int spacingType, float position) {
|
public void setPositionValue(int spacingType, float position) {
|
||||||
if (style.position.set(spacingType, position)) {
|
if (style.position.set(spacingType, position)) {
|
||||||
dirty();
|
dirty();
|
||||||
}
|
}
|
||||||
@@ -396,9 +396,7 @@ public class CSSNode {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void setPositionTop(float positionTop) {
|
public void setPositionTop(float positionTop) {
|
||||||
if (style.position.set(TOP, positionTop)) {
|
setPositionValue(TOP, positionTop);
|
||||||
dirty();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -409,9 +407,7 @@ public class CSSNode {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void setPositionBottom(float positionBottom) {
|
public void setPositionBottom(float positionBottom) {
|
||||||
if (style.position.set(BOTTOM, positionBottom)) {
|
setPositionValue(BOTTOM, positionBottom);
|
||||||
dirty();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -422,9 +418,7 @@ public class CSSNode {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void setPositionLeft(float positionLeft) {
|
public void setPositionLeft(float positionLeft) {
|
||||||
if (style.position.set(LEFT, positionLeft)) {
|
setPositionValue(LEFT, positionLeft);
|
||||||
dirty();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -435,9 +429,7 @@ public class CSSNode {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void setPositionRight(float positionRight) {
|
public void setPositionRight(float positionRight) {
|
||||||
if (style.position.set(RIGHT, positionRight)) {
|
setPositionValue(RIGHT, positionRight);
|
||||||
dirty();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -2957,8 +2957,8 @@ public class LayoutEngineTest {
|
|||||||
TestCSSNode root_node = new TestCSSNode();
|
TestCSSNode root_node = new TestCSSNode();
|
||||||
{
|
{
|
||||||
TestCSSNode node_0 = root_node;
|
TestCSSNode node_0 = root_node;
|
||||||
node_0.setPosition(Spacing.LEFT, 5);
|
node_0.setPositionValue(Spacing.LEFT, 5);
|
||||||
node_0.setPosition(Spacing.TOP, 5);
|
node_0.setPositionValue(Spacing.TOP, 5);
|
||||||
}
|
}
|
||||||
|
|
||||||
TestCSSNode root_layout = new TestCSSNode();
|
TestCSSNode root_layout = new TestCSSNode();
|
||||||
@@ -3016,7 +3016,7 @@ public class LayoutEngineTest {
|
|||||||
TestCSSNode root_node = new TestCSSNode();
|
TestCSSNode root_node = new TestCSSNode();
|
||||||
{
|
{
|
||||||
TestCSSNode node_0 = root_node;
|
TestCSSNode node_0 = root_node;
|
||||||
node_0.setPosition(Spacing.BOTTOM, 5);
|
node_0.setPositionValue(Spacing.BOTTOM, 5);
|
||||||
}
|
}
|
||||||
|
|
||||||
TestCSSNode root_layout = new TestCSSNode();
|
TestCSSNode root_layout = new TestCSSNode();
|
||||||
@@ -3037,8 +3037,8 @@ public class LayoutEngineTest {
|
|||||||
TestCSSNode root_node = new TestCSSNode();
|
TestCSSNode root_node = new TestCSSNode();
|
||||||
{
|
{
|
||||||
TestCSSNode node_0 = root_node;
|
TestCSSNode node_0 = root_node;
|
||||||
node_0.setPosition(Spacing.TOP, 10);
|
node_0.setPositionValue(Spacing.TOP, 10);
|
||||||
node_0.setPosition(Spacing.BOTTOM, 5);
|
node_0.setPositionValue(Spacing.BOTTOM, 5);
|
||||||
}
|
}
|
||||||
|
|
||||||
TestCSSNode root_layout = new TestCSSNode();
|
TestCSSNode root_layout = new TestCSSNode();
|
||||||
@@ -3333,8 +3333,8 @@ public class LayoutEngineTest {
|
|||||||
node_1.style.dimensions[DIMENSION_HEIGHT] = 100;
|
node_1.style.dimensions[DIMENSION_HEIGHT] = 100;
|
||||||
node_1 = node_0.getChildAt(1);
|
node_1 = node_0.getChildAt(1);
|
||||||
node_1.style.positionType = CSSPositionType.ABSOLUTE;
|
node_1.style.positionType = CSSPositionType.ABSOLUTE;
|
||||||
node_1.setPosition(Spacing.LEFT, 10);
|
node_1.setPositionValue(Spacing.LEFT, 10);
|
||||||
node_1.setPosition(Spacing.TOP, 10);
|
node_1.setPositionValue(Spacing.TOP, 10);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -3381,7 +3381,7 @@ public class LayoutEngineTest {
|
|||||||
TestCSSNode node_1;
|
TestCSSNode node_1;
|
||||||
node_1 = node_0.getChildAt(0);
|
node_1 = node_0.getChildAt(0);
|
||||||
node_1.style.positionType = CSSPositionType.ABSOLUTE;
|
node_1.style.positionType = CSSPositionType.ABSOLUTE;
|
||||||
node_1.setPosition(Spacing.LEFT, 5);
|
node_1.setPositionValue(Spacing.LEFT, 5);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -3418,7 +3418,7 @@ public class LayoutEngineTest {
|
|||||||
node_1 = node_0.getChildAt(0);
|
node_1 = node_0.getChildAt(0);
|
||||||
node_1.style.positionType = CSSPositionType.ABSOLUTE;
|
node_1.style.positionType = CSSPositionType.ABSOLUTE;
|
||||||
node_1.setMargin(Spacing.TOP, 5);
|
node_1.setMargin(Spacing.TOP, 5);
|
||||||
node_1.setPosition(Spacing.TOP, 5);
|
node_1.setPositionValue(Spacing.TOP, 5);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -3455,7 +3455,7 @@ public class LayoutEngineTest {
|
|||||||
node_1 = node_0.getChildAt(0);
|
node_1 = node_0.getChildAt(0);
|
||||||
node_1.style.positionType = CSSPositionType.ABSOLUTE;
|
node_1.style.positionType = CSSPositionType.ABSOLUTE;
|
||||||
node_1.setMargin(Spacing.LEFT, 5);
|
node_1.setMargin(Spacing.LEFT, 5);
|
||||||
node_1.setPosition(Spacing.LEFT, 5);
|
node_1.setPositionValue(Spacing.LEFT, 5);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -4028,7 +4028,7 @@ public class LayoutEngineTest {
|
|||||||
TestCSSNode node_1;
|
TestCSSNode node_1;
|
||||||
node_1 = node_0.getChildAt(0);
|
node_1 = node_0.getChildAt(0);
|
||||||
node_1.style.positionType = CSSPositionType.ABSOLUTE;
|
node_1.style.positionType = CSSPositionType.ABSOLUTE;
|
||||||
node_1.setPosition(Spacing.TOP, -1);
|
node_1.setPositionValue(Spacing.TOP, -1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -4070,7 +4070,7 @@ public class LayoutEngineTest {
|
|||||||
TestCSSNode node_1;
|
TestCSSNode node_1;
|
||||||
node_1 = node_0.getChildAt(0);
|
node_1 = node_0.getChildAt(0);
|
||||||
node_1.style.positionType = CSSPositionType.ABSOLUTE;
|
node_1.style.positionType = CSSPositionType.ABSOLUTE;
|
||||||
node_1.setPosition(Spacing.LEFT, 5);
|
node_1.setPositionValue(Spacing.LEFT, 5);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -5199,10 +5199,10 @@ public class LayoutEngineTest {
|
|||||||
TestCSSNode node_1;
|
TestCSSNode node_1;
|
||||||
node_1 = node_0.getChildAt(0);
|
node_1 = node_0.getChildAt(0);
|
||||||
node_1.style.positionType = CSSPositionType.ABSOLUTE;
|
node_1.style.positionType = CSSPositionType.ABSOLUTE;
|
||||||
node_1.setPosition(Spacing.LEFT, 0);
|
node_1.setPositionValue(Spacing.LEFT, 0);
|
||||||
node_1.setPosition(Spacing.TOP, 0);
|
node_1.setPositionValue(Spacing.TOP, 0);
|
||||||
node_1.setPosition(Spacing.RIGHT, 0);
|
node_1.setPositionValue(Spacing.RIGHT, 0);
|
||||||
node_1.setPosition(Spacing.BOTTOM, 0);
|
node_1.setPositionValue(Spacing.BOTTOM, 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -5384,8 +5384,8 @@ public class LayoutEngineTest {
|
|||||||
node_1.style.dimensions[DIMENSION_HEIGHT] = 100;
|
node_1.style.dimensions[DIMENSION_HEIGHT] = 100;
|
||||||
node_1 = node_0.getChildAt(1);
|
node_1 = node_0.getChildAt(1);
|
||||||
node_1.style.positionType = CSSPositionType.ABSOLUTE;
|
node_1.style.positionType = CSSPositionType.ABSOLUTE;
|
||||||
node_1.setPosition(Spacing.LEFT, 0);
|
node_1.setPositionValue(Spacing.LEFT, 0);
|
||||||
node_1.setPosition(Spacing.RIGHT, 0);
|
node_1.setPositionValue(Spacing.RIGHT, 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -5427,8 +5427,8 @@ public class LayoutEngineTest {
|
|||||||
TestCSSNode node_1;
|
TestCSSNode node_1;
|
||||||
node_1 = node_0.getChildAt(0);
|
node_1 = node_0.getChildAt(0);
|
||||||
node_1.style.positionType = CSSPositionType.ABSOLUTE;
|
node_1.style.positionType = CSSPositionType.ABSOLUTE;
|
||||||
node_1.setPosition(Spacing.TOP, 0);
|
node_1.setPositionValue(Spacing.TOP, 0);
|
||||||
node_1.setPosition(Spacing.BOTTOM, 20);
|
node_1.setPositionValue(Spacing.BOTTOM, 20);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -5467,10 +5467,10 @@ public class LayoutEngineTest {
|
|||||||
node_1 = node_0.getChildAt(0);
|
node_1 = node_0.getChildAt(0);
|
||||||
node_1.style.justifyContent = CSSJustify.CENTER;
|
node_1.style.justifyContent = CSSJustify.CENTER;
|
||||||
node_1.style.positionType = CSSPositionType.ABSOLUTE;
|
node_1.style.positionType = CSSPositionType.ABSOLUTE;
|
||||||
node_1.setPosition(Spacing.LEFT, 0);
|
node_1.setPositionValue(Spacing.LEFT, 0);
|
||||||
node_1.setPosition(Spacing.TOP, 0);
|
node_1.setPositionValue(Spacing.TOP, 0);
|
||||||
node_1.setPosition(Spacing.RIGHT, 0);
|
node_1.setPositionValue(Spacing.RIGHT, 0);
|
||||||
node_1.setPosition(Spacing.BOTTOM, 0);
|
node_1.setPositionValue(Spacing.BOTTOM, 0);
|
||||||
addChildren(node_1, 1);
|
addChildren(node_1, 1);
|
||||||
{
|
{
|
||||||
TestCSSNode node_2;
|
TestCSSNode node_2;
|
||||||
@@ -5523,7 +5523,7 @@ public class LayoutEngineTest {
|
|||||||
TestCSSNode node_1;
|
TestCSSNode node_1;
|
||||||
node_1 = node_0.getChildAt(0);
|
node_1 = node_0.getChildAt(0);
|
||||||
node_1.style.positionType = CSSPositionType.ABSOLUTE;
|
node_1.style.positionType = CSSPositionType.ABSOLUTE;
|
||||||
node_1.setPosition(Spacing.BOTTOM, 0);
|
node_1.setPositionValue(Spacing.BOTTOM, 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -5560,7 +5560,7 @@ public class LayoutEngineTest {
|
|||||||
TestCSSNode node_1;
|
TestCSSNode node_1;
|
||||||
node_1 = node_0.getChildAt(0);
|
node_1 = node_0.getChildAt(0);
|
||||||
node_1.style.positionType = CSSPositionType.ABSOLUTE;
|
node_1.style.positionType = CSSPositionType.ABSOLUTE;
|
||||||
node_1.setPosition(Spacing.RIGHT, 0);
|
node_1.setPositionValue(Spacing.RIGHT, 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -5598,7 +5598,7 @@ public class LayoutEngineTest {
|
|||||||
node_1 = node_0.getChildAt(0);
|
node_1 = node_0.getChildAt(0);
|
||||||
node_1.style.positionType = CSSPositionType.ABSOLUTE;
|
node_1.style.positionType = CSSPositionType.ABSOLUTE;
|
||||||
node_1.style.dimensions[DIMENSION_HEIGHT] = 10;
|
node_1.style.dimensions[DIMENSION_HEIGHT] = 10;
|
||||||
node_1.setPosition(Spacing.BOTTOM, 0);
|
node_1.setPositionValue(Spacing.BOTTOM, 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -5636,7 +5636,7 @@ public class LayoutEngineTest {
|
|||||||
node_1 = node_0.getChildAt(0);
|
node_1 = node_0.getChildAt(0);
|
||||||
node_1.style.positionType = CSSPositionType.ABSOLUTE;
|
node_1.style.positionType = CSSPositionType.ABSOLUTE;
|
||||||
node_1.style.dimensions[DIMENSION_WIDTH] = 10;
|
node_1.style.dimensions[DIMENSION_WIDTH] = 10;
|
||||||
node_1.setPosition(Spacing.RIGHT, 0);
|
node_1.setPositionValue(Spacing.RIGHT, 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -5673,7 +5673,7 @@ public class LayoutEngineTest {
|
|||||||
node_1 = node_0.getChildAt(0);
|
node_1 = node_0.getChildAt(0);
|
||||||
node_1.style.positionType = CSSPositionType.ABSOLUTE;
|
node_1.style.positionType = CSSPositionType.ABSOLUTE;
|
||||||
node_1.style.dimensions[DIMENSION_HEIGHT] = 10;
|
node_1.style.dimensions[DIMENSION_HEIGHT] = 10;
|
||||||
node_1.setPosition(Spacing.BOTTOM, 0);
|
node_1.setPositionValue(Spacing.BOTTOM, 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -5710,7 +5710,7 @@ public class LayoutEngineTest {
|
|||||||
node_1 = node_0.getChildAt(0);
|
node_1 = node_0.getChildAt(0);
|
||||||
node_1.style.positionType = CSSPositionType.ABSOLUTE;
|
node_1.style.positionType = CSSPositionType.ABSOLUTE;
|
||||||
node_1.style.dimensions[DIMENSION_WIDTH] = 10;
|
node_1.style.dimensions[DIMENSION_WIDTH] = 10;
|
||||||
node_1.setPosition(Spacing.RIGHT, 0);
|
node_1.setPositionValue(Spacing.RIGHT, 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -5890,7 +5890,7 @@ public class LayoutEngineTest {
|
|||||||
{
|
{
|
||||||
TestCSSNode node_1;
|
TestCSSNode node_1;
|
||||||
node_1 = node_0.getChildAt(0);
|
node_1 = node_0.getChildAt(0);
|
||||||
node_1.setPosition(Spacing.LEFT, 5);
|
node_1.setPositionValue(Spacing.LEFT, 5);
|
||||||
addChildren(node_1, 1);
|
addChildren(node_1, 1);
|
||||||
{
|
{
|
||||||
TestCSSNode node_2;
|
TestCSSNode node_2;
|
||||||
@@ -7297,10 +7297,10 @@ public class LayoutEngineTest {
|
|||||||
node_1.style.positionType = CSSPositionType.ABSOLUTE;
|
node_1.style.positionType = CSSPositionType.ABSOLUTE;
|
||||||
node_1.style.maxWidth = 500;
|
node_1.style.maxWidth = 500;
|
||||||
node_1.style.maxHeight = 600;
|
node_1.style.maxHeight = 600;
|
||||||
node_1.setPosition(Spacing.LEFT, 100);
|
node_1.setPositionValue(Spacing.LEFT, 100);
|
||||||
node_1.setPosition(Spacing.TOP, 100);
|
node_1.setPositionValue(Spacing.TOP, 100);
|
||||||
node_1.setPosition(Spacing.RIGHT, 100);
|
node_1.setPositionValue(Spacing.RIGHT, 100);
|
||||||
node_1.setPosition(Spacing.BOTTOM, 100);
|
node_1.setPositionValue(Spacing.BOTTOM, 100);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -7340,10 +7340,10 @@ public class LayoutEngineTest {
|
|||||||
node_1.style.positionType = CSSPositionType.ABSOLUTE;
|
node_1.style.positionType = CSSPositionType.ABSOLUTE;
|
||||||
node_1.style.minWidth = 900;
|
node_1.style.minWidth = 900;
|
||||||
node_1.style.minHeight = 1000;
|
node_1.style.minHeight = 1000;
|
||||||
node_1.setPosition(Spacing.LEFT, 100);
|
node_1.setPositionValue(Spacing.LEFT, 100);
|
||||||
node_1.setPosition(Spacing.TOP, 100);
|
node_1.setPositionValue(Spacing.TOP, 100);
|
||||||
node_1.setPosition(Spacing.RIGHT, 100);
|
node_1.setPositionValue(Spacing.RIGHT, 100);
|
||||||
node_1.setPosition(Spacing.BOTTOM, 100);
|
node_1.setPositionValue(Spacing.BOTTOM, 100);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -7478,19 +7478,19 @@ public class LayoutEngineTest {
|
|||||||
node_1.setPadding(Spacing.BOTTOM, 10);
|
node_1.setPadding(Spacing.BOTTOM, 10);
|
||||||
node_1.setPadding(Spacing.START, 10);
|
node_1.setPadding(Spacing.START, 10);
|
||||||
node_1.setPadding(Spacing.END, 10);
|
node_1.setPadding(Spacing.END, 10);
|
||||||
node_1.setPosition(Spacing.LEFT, 100);
|
node_1.setPositionValue(Spacing.LEFT, 100);
|
||||||
node_1.setPosition(Spacing.TOP, 100);
|
node_1.setPositionValue(Spacing.TOP, 100);
|
||||||
node_1.setPosition(Spacing.RIGHT, 100);
|
node_1.setPositionValue(Spacing.RIGHT, 100);
|
||||||
node_1.setPosition(Spacing.BOTTOM, 100);
|
node_1.setPositionValue(Spacing.BOTTOM, 100);
|
||||||
addChildren(node_1, 1);
|
addChildren(node_1, 1);
|
||||||
{
|
{
|
||||||
TestCSSNode node_2;
|
TestCSSNode node_2;
|
||||||
node_2 = node_1.getChildAt(0);
|
node_2 = node_1.getChildAt(0);
|
||||||
node_2.style.positionType = CSSPositionType.ABSOLUTE;
|
node_2.style.positionType = CSSPositionType.ABSOLUTE;
|
||||||
node_2.setPosition(Spacing.LEFT, 10);
|
node_2.setPositionValue(Spacing.LEFT, 10);
|
||||||
node_2.setPosition(Spacing.TOP, 10);
|
node_2.setPositionValue(Spacing.TOP, 10);
|
||||||
node_2.setPosition(Spacing.RIGHT, 10);
|
node_2.setPositionValue(Spacing.RIGHT, 10);
|
||||||
node_2.setPosition(Spacing.BOTTOM, 10);
|
node_2.setPositionValue(Spacing.BOTTOM, 10);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -7550,19 +7550,19 @@ public class LayoutEngineTest {
|
|||||||
node_1.setBorder(Spacing.BOTTOM, 1);
|
node_1.setBorder(Spacing.BOTTOM, 1);
|
||||||
node_1.setBorder(Spacing.START, 1);
|
node_1.setBorder(Spacing.START, 1);
|
||||||
node_1.setBorder(Spacing.END, 1);
|
node_1.setBorder(Spacing.END, 1);
|
||||||
node_1.setPosition(Spacing.LEFT, 100);
|
node_1.setPositionValue(Spacing.LEFT, 100);
|
||||||
node_1.setPosition(Spacing.TOP, 100);
|
node_1.setPositionValue(Spacing.TOP, 100);
|
||||||
node_1.setPosition(Spacing.RIGHT, 100);
|
node_1.setPositionValue(Spacing.RIGHT, 100);
|
||||||
node_1.setPosition(Spacing.BOTTOM, 100);
|
node_1.setPositionValue(Spacing.BOTTOM, 100);
|
||||||
addChildren(node_1, 1);
|
addChildren(node_1, 1);
|
||||||
{
|
{
|
||||||
TestCSSNode node_2;
|
TestCSSNode node_2;
|
||||||
node_2 = node_1.getChildAt(0);
|
node_2 = node_1.getChildAt(0);
|
||||||
node_2.style.positionType = CSSPositionType.ABSOLUTE;
|
node_2.style.positionType = CSSPositionType.ABSOLUTE;
|
||||||
node_2.setPosition(Spacing.LEFT, 10);
|
node_2.setPositionValue(Spacing.LEFT, 10);
|
||||||
node_2.setPosition(Spacing.TOP, 10);
|
node_2.setPositionValue(Spacing.TOP, 10);
|
||||||
node_2.setPosition(Spacing.RIGHT, 10);
|
node_2.setPositionValue(Spacing.RIGHT, 10);
|
||||||
node_2.setPosition(Spacing.BOTTOM, 10);
|
node_2.setPositionValue(Spacing.BOTTOM, 10);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -7621,10 +7621,10 @@ public class LayoutEngineTest {
|
|||||||
TestCSSNode node_2;
|
TestCSSNode node_2;
|
||||||
node_2 = node_1.getChildAt(0);
|
node_2 = node_1.getChildAt(0);
|
||||||
node_2.style.positionType = CSSPositionType.ABSOLUTE;
|
node_2.style.positionType = CSSPositionType.ABSOLUTE;
|
||||||
node_2.setPosition(Spacing.LEFT, 10);
|
node_2.setPositionValue(Spacing.LEFT, 10);
|
||||||
node_2.setPosition(Spacing.TOP, 10);
|
node_2.setPositionValue(Spacing.TOP, 10);
|
||||||
node_2.setPosition(Spacing.RIGHT, 10);
|
node_2.setPositionValue(Spacing.RIGHT, 10);
|
||||||
node_2.setPosition(Spacing.BOTTOM, 10);
|
node_2.setPositionValue(Spacing.BOTTOM, 10);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user