Files
yoga/javascript/sources/YGEnums.js
Lukas Wöhrl 20536923d6 flex-wrap: wrap-reverse support
Summary:
I couldn't resist to do this 😄 #394

This adds ```flex-wrap: wrap-reverse```

I think we hit a edge case here:
https://stackoverflow.com/questions/33891709/when-flexbox-items-wrap-in-column-mode-container-does-not-grow-its-width

as is differs here from chrome, but I think that yoga is here more correct.

So I haven't added this test yet as this would fail against chrome, as chrome outputs a width of 30 for root, whereas yoga gets a width of 60 here, which I think is correct. Strangely the output of ```flex-wrap:wrap``` is in jsfiddle also only with a (visual) width of 30 on chrome, while the tests gets generated with 60.

```html
<div id="wrap_reverse_column" style="height: 100px; flex-wrap: wrap-reverse">
  <div style="height: 30px; width: 30px;"></div>
  <div style="height: 30px; width: 30px;"></div>
  <div style="height: 30px; width: 30px;"></div>
  <div style="height: 30px; width: 30px;"></div>
</div>
```

Looking forward what you think here emilsjolander
Closes https://github.com/facebook/yoga/pull/398

Reviewed By: astreet

Differential Revision: D4564711

Pulled By: emilsjolander

fbshipit-source-id: 33dc055abd8444b2aa7796ef90bd7ec99e961bb8
2017-02-15 13:42:47 -08:00

101 lines
2.0 KiB
JavaScript

/**
* Copyright (c) 2014-present, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*/
module.exports = {
ALIGN_COUNT: 8,
ALIGN_AUTO: 0,
ALIGN_FLEX_START: 1,
ALIGN_CENTER: 2,
ALIGN_FLEX_END: 3,
ALIGN_STRETCH: 4,
ALIGN_BASELINE: 5,
ALIGN_SPACE_BETWEEN: 6,
ALIGN_SPACE_AROUND: 7,
DIMENSION_COUNT: 2,
DIMENSION_WIDTH: 0,
DIMENSION_HEIGHT: 1,
DIRECTION_COUNT: 3,
DIRECTION_INHERIT: 0,
DIRECTION_LTR: 1,
DIRECTION_RTL: 2,
DISPLAY_COUNT: 2,
DISPLAY_FLEX: 0,
DISPLAY_NONE: 1,
EDGE_COUNT: 9,
EDGE_LEFT: 0,
EDGE_TOP: 1,
EDGE_RIGHT: 2,
EDGE_BOTTOM: 3,
EDGE_START: 4,
EDGE_END: 5,
EDGE_HORIZONTAL: 6,
EDGE_VERTICAL: 7,
EDGE_ALL: 8,
EXPERIMENTAL_FEATURE_COUNT: 2,
EXPERIMENTAL_FEATURE_ROUNDING: 0,
EXPERIMENTAL_FEATURE_WEB_FLEX_BASIS: 1,
FLEX_DIRECTION_COUNT: 4,
FLEX_DIRECTION_COLUMN: 0,
FLEX_DIRECTION_COLUMN_REVERSE: 1,
FLEX_DIRECTION_ROW: 2,
FLEX_DIRECTION_ROW_REVERSE: 3,
JUSTIFY_COUNT: 5,
JUSTIFY_FLEX_START: 0,
JUSTIFY_CENTER: 1,
JUSTIFY_FLEX_END: 2,
JUSTIFY_SPACE_BETWEEN: 3,
JUSTIFY_SPACE_AROUND: 4,
LOG_LEVEL_COUNT: 5,
LOG_LEVEL_ERROR: 0,
LOG_LEVEL_WARN: 1,
LOG_LEVEL_INFO: 2,
LOG_LEVEL_DEBUG: 3,
LOG_LEVEL_VERBOSE: 4,
MEASURE_MODE_COUNT: 3,
MEASURE_MODE_UNDEFINED: 0,
MEASURE_MODE_EXACTLY: 1,
MEASURE_MODE_AT_MOST: 2,
OVERFLOW_COUNT: 3,
OVERFLOW_VISIBLE: 0,
OVERFLOW_HIDDEN: 1,
OVERFLOW_SCROLL: 2,
POSITION_TYPE_COUNT: 2,
POSITION_TYPE_RELATIVE: 0,
POSITION_TYPE_ABSOLUTE: 1,
PRINT_OPTIONS_COUNT: 3,
PRINT_OPTIONS_LAYOUT: 1,
PRINT_OPTIONS_STYLE: 2,
PRINT_OPTIONS_CHILDREN: 4,
UNIT_COUNT: 4,
UNIT_UNDEFINED: 0,
UNIT_POINT: 1,
UNIT_PERCENT: 2,
UNIT_AUTO: 3,
WRAP_COUNT: 3,
WRAP_NO_WRAP: 0,
WRAP_WRAP: 1,
WRAP_WRAP_REVERSE: 2,
};