Expose the resolved direction in the node's layout

This commit is contained in:
Lucas Rocha
2015-05-20 11:12:24 +01:00
parent ee1cbacc30
commit 524b44200a
7 changed files with 33 additions and 0 deletions

View File

@@ -211,6 +211,13 @@ public class CSSNode {
return o1.equals(o2);
}
public void setDirection(CSSDirection direction) {
if (!valuesEqual(style.direction, direction)) {
style.direction = direction;
dirty();
}
}
public void setFlexDirection(CSSFlexDirection flexDirection) {
if (!valuesEqual(style.flexDirection, flexDirection)) {
style.flexDirection = flexDirection;
@@ -336,6 +343,10 @@ public class CSSNode {
return layout.height;
}
public CSSDirection getLayoutDirection() {
return layout.direction;
}
/**
* Get this node's padding, as defined by style + default padding.
*/