Support RTL direction and ROW_REVERSE & COLUMN_REVERSE flex direction #82
Reference in New Issue
Block a user
No description provided.
Delete Branch "rtl"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
This PR adds support for a direction style property (equivalent to Chrome's
direction
CSS property) that allows you to change the row flow for flexbox allows. By default, all nodes inherit the direction from their parents. If the parent direction is not explicitly defined, left-to-right is used. This means that, by default, nodes from a subtree will share the same direction defined by the root. You can also have node trees with mixed directions, as covered by one of the new tests.Given that the work to implement RTL support is analogous to
ROW_REVERSE
andCOLUMN_REVERSE
, I went ahead and implemented them as well.These new features require a small API break in the
layoutNode()
for both C and Java as well as a few new types for the new direction style property and the new flex direction values.I added a bunch of analogous tests for the reversed layout cases and a few new tests to verify that the new features work correctly.
I split the changes into separate commits to make them a bit easier to review: one with the Javascript changes and another with the updates to the transpiled versions. I'll squash them together before merging.
Grrr, this error is super weird
Okay, I just pushed a diff that shows all the children.