Lucas Rocha
1ab785b7a3
Inline immutable values in layout algorithm
...
Store immutable values from the node being laid out to avoid unnecessary
method invocations during layout calculation. This gives us a 3%-5%
performance boost in my benchmarks on Android.
2015-09-08 15:15:52 +01:00
Lucas Rocha
06c708053f
Change Java to use array indexes instead of methods
...
Method invocations are not entirely free on Android. Change the
generated Java code to use the same array-based approach used in
JS and C to compute dimensions, positions, etc instead of relying
too heavily on method invovations. As a bonus, the Java transpiler
becomes a lot simpler because the code is more analogous to the C
counterpart.
In my local benchmarks this change gives us a major performance
boost on Android (between 15% and 30%) depending on the device
and the runtime (Dalvik|Art).
2015-09-08 15:15:46 +01:00
Colin Eberhardt
f9bb74aedf
Updated the public API to no-longer extract nodes
2015-08-13 09:56:16 +01:00
Colin Eberhardt
5653e4ef82
Fixed build and added distribution files to the repo
2015-08-11 21:22:27 +01:00
Colin Eberhardt
7f9b3afe33
Updated documentation
...
(And added missing change from previous commit!)
2015-08-11 17:56:21 +01:00
Lucas Rocha
524b44200a
Expose the resolved direction in the node's layout
2015-05-20 11:35:01 +01:00
Pierre Renaux
019fc9b88c
Merge remote-tracking branch 'upstream/master'
2015-05-17 21:54:30 +08:00
Lucas Rocha
03dfe7bb17
Implement (padding|border|margin)-(start|end) support
2015-05-14 17:43:33 +01:00
Christopher Chedeau
c3a2ddcce7
Merge pull request #84 from lukasreichart/master
...
If the measure function is defined: only return from execution of lay…
2015-05-14 08:48:04 -07:00
Nick Lockwood
9175721f07
Removed space before -- for consistency with code style.
2015-05-12 10:10:39 +01:00
Nick Lockwood
bf1d7eacfd
Fixed spacing for wrapped elements
2015-05-12 09:54:02 +01:00
Lucas Rocha
36a46673f9
Support ROW_REVERSE, COLUMN_REVERSE and RTL direction
2015-05-11 11:24:21 +01:00
Lukas Reichart
fca176109d
If the measure function is defined: only return from execution of layoutNode, when the node has no children.
2015-05-10 17:46:48 +02:00
Pierre Renaux
09f0c12a8f
[src/Layout.js]: Cleaner line loop in <Loop E> (alignContent layout) ;
2015-05-10 00:20:29 +08:00
Pierre Renaux
c7fbf44474
'alignContent' defaults to 'flex-start' instead of 'stretch' ;
2015-05-10 00:19:30 +08:00
Pierre Renaux
cc5f772bff
Style fixes ;
2015-05-10 00:19:29 +08:00
Pierre Renaux
68d029e460
[src/__tests__/Layout-test.js]: Added 16 test cases for each alignContent / alignItems combination - also includes alignSelf testing within the test data ;
2015-05-10 00:19:27 +08:00
Pierre Renaux
998fa1d6ba
[Issue facebook/css-layout#78 ]: Implemented alignContent ;
2015-05-10 00:19:27 +08:00
Christopher Chedeau
3203e86155
Merge pull request #70 from tadeuzagallo/remove-dead-code
...
Remove unused code pointed by Xcode
2015-05-05 08:10:04 -07:00
Andrew Rasmussen
86c39b5e4f
Revert "Ensure that flex children adopt their parent's cross-axis min dimension."
...
This reverts commit b8316413b3
.
This was causing issues for existing components built with React
Native.. we need to investigate more in the future.
2015-05-01 12:16:47 -07:00
Andrew Rasmussen
5f52e947cb
Fix layout for absolutely positioned nodes with absolutely positioned parents that have border and/or padding
2015-04-30 14:40:39 -07:00
Tadeu Zagallo
aad5efe938
Remove unused code pointed by Xcode
2015-04-24 16:45:49 +01:00
Russell Keith-Magee
b8316413b3
Ensure that flex children adopt their parent's cross-axis min dimension.
2015-04-07 10:52:15 +08:00
Russell Keith-Magee
6ca5fc5cb4
Cleanup of accessor logic in boundAxis.
2015-04-01 14:46:55 +08:00
Russell Keith-Magee
2b6844f00a
Simplified logic distributing flex space.
2015-03-31 18:58:56 +08:00
Russell Keith-Magee
c523b7c404
Added support for min/max width and height constraints.
2015-03-31 17:32:54 +08:00
Tom Mulcahy
ddd7a899ac
Make Java measure thread-safe.
2015-03-26 22:49:48 +00:00
daviskoh
9c71cc6d1f
resolve merge conflicts
2015-02-17 21:30:41 -05:00
daviskoh
3a6e50db99
Address eslint errors:
...
* modify .eslintrc w/ globals & rules
* use judgement in deciding bet proj style & eslint recommendation
* make
2015-02-17 21:12:29 -05:00
Jimmy Miller
8fe8c15e6d
Rework javascript api to match README
2015-02-15 20:56:37 -05:00
Alexander Gugel
b942b5ff60
Add UMD
2015-02-12 20:46:29 +01:00
daviskoh
cf9b841e33
Fix jshint issues
...
* add .jshintrc
* address semicolon errors
* ignore 'already defined' errors
2015-02-05 19:49:55 -05:00
Christopher Chedeau
9001a3d2ac
do not infinite loop when there's an element bigger than the container with flex-wrap
2014-12-12 12:24:26 +00:00
Christopher Chedeau
10fb645777
Initial implementation of flexWrap
2014-12-12 12:03:31 +00:00
Christopher Chedeau
ab64a5b624
fix children with left
2014-12-11 15:58:45 +00:00
Christopher Chedeau
ba873aa3d7
fix layout border bottom and flex end with an empty child
2014-12-11 14:42:31 +00:00
Christopher Chedeau
79286e6263
fix positive margin top inside of justify content center container
2014-12-11 14:31:17 +00:00
Christopher Chedeau
570f7bf98a
fix test case not passing because of div by 0
2014-12-11 14:22:04 +00:00
Christopher Chedeau
5a3303ac5e
fix bug with negative margin inside of a justifyContent: center container
2014-12-11 14:12:12 +00:00
Christopher Chedeau
c2aa92cd0b
Add licenses and remove third party libraries
2014-10-29 08:01:22 -07:00
Christopher Chedeau
c0f895c6f2
Make align-items: stretch the default
2014-10-08 09:35:44 -07:00
Andy Street
6d93c20610
Java
2014-10-07 16:22:27 -07:00
Andrew Rasmussen
7eef01f299
make setting bottom/right calculate top/left
2014-09-30 15:24:42 -07:00
Andrew Rasmussen
0ae8bcf8f6
Add second position: absolute pass
2014-09-30 13:11:32 -07:00
Alex Kotliarskyi
a047e4d5fe
Automated script to transpile code and tests to C
2014-09-26 17:19:59 -07:00
Andrew Rasmussen
6f347d74a3
Added another pass to calclulate absolutely positioned elements last
2014-09-25 16:05:01 -07:00
Christopher Chedeau
d7f3ea868d
Import latest changes
2014-09-11 09:23:30 -07:00
Christopher Chedeau
6ecbf80563
correctly support border with right. This is weird that border is ignored but it's the same behavior on both chrome and firefox
2014-06-12 12:06:07 -07:00
Christopher Chedeau
a36820d15e
better handling for padding in a top/bottom or left/right configuration
2014-06-12 11:52:07 -07:00
Christopher Chedeau
900beefa1e
height overrides top+bottom
2014-06-12 11:43:30 -07:00