main
Last change
on this file since d565449 was d565449, checked in by stefan toskovski <stefantoska84@…>, 4 weeks ago |
Update repo after prototype presentation
|
-
Property mode
set to
100644
|
File size:
893 bytes
|
Line | |
---|
1 | var alternativeValues = {
|
---|
2 | 'space-around': 'justify',
|
---|
3 | 'space-between': 'justify',
|
---|
4 | 'flex-start': 'start',
|
---|
5 | 'flex-end': 'end',
|
---|
6 | 'wrap-reverse': 'multiple',
|
---|
7 | wrap: 'multiple'
|
---|
8 | };
|
---|
9 |
|
---|
10 | var alternativeProps = {
|
---|
11 | alignItems: 'WebkitBoxAlign',
|
---|
12 | justifyContent: 'WebkitBoxPack',
|
---|
13 | flexWrap: 'WebkitBoxLines',
|
---|
14 | flexGrow: 'WebkitBoxFlex'
|
---|
15 | };
|
---|
16 |
|
---|
17 | export default function flexboxOld(property, value, style) {
|
---|
18 | if (property === 'flexDirection' && typeof value === 'string') {
|
---|
19 | if (value.indexOf('column') > -1) {
|
---|
20 | style.WebkitBoxOrient = 'vertical';
|
---|
21 | } else {
|
---|
22 | style.WebkitBoxOrient = 'horizontal';
|
---|
23 | }
|
---|
24 | if (value.indexOf('reverse') > -1) {
|
---|
25 | style.WebkitBoxDirection = 'reverse';
|
---|
26 | } else {
|
---|
27 | style.WebkitBoxDirection = 'normal';
|
---|
28 | }
|
---|
29 | }
|
---|
30 | if (alternativeProps.hasOwnProperty(property)) {
|
---|
31 | style[alternativeProps[property]] = alternativeValues[value] || value;
|
---|
32 | }
|
---|
33 | } |
---|
Note:
See
TracBrowser
for help on using the repository browser.