added baseline support
This commit is contained in:
26
gentest/fixtures/YGAlignBaseline.html
Normal file
26
gentest/fixtures/YGAlignBaseline.html
Normal file
@@ -0,0 +1,26 @@
|
||||
<div id="align_baseline" style="width: 100px; height: 100px; flex-direction:row; align-items: baseline;">
|
||||
<div style="width: 50px; height: 50px;"></div>
|
||||
<div style="width: 50px; height: 20px;"></div>
|
||||
</div>
|
||||
|
||||
<div id="align_baseline_child" style="width: 100px; height: 100px; flex-direction:row; background-color:red; align-items: baseline;">
|
||||
<div style="width: 50px; height: 50px;background-color:green"></div>
|
||||
<div style="width: 50px; height: 20px;background-color:green">
|
||||
<div style="width: 50px; height: 10px;background-color:yellow"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="align_baseline_double_nested_child" style="width: 100px; height: 100px; flex-direction:row; background-color:red; align-items: baseline;">
|
||||
<div style="width: 50px; height: 50px;background-color:green">
|
||||
<div style="width: 50px; height: 20px;background-color:yellow"></div>
|
||||
</div>
|
||||
<div style="width: 50px; height: 20px;background-color:green">
|
||||
<div style="width: 50px; height: 15px;background-color:yellow"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div id="align_baseline_column" style="width: 100px; height: 100px; flex-direction:column; align-items: baseline;">
|
||||
<div style="width: 50px; height: 50px;"></div>
|
||||
<div style="width: 50px; height: 20px;"></div>
|
||||
</div>
|
@@ -82,6 +82,8 @@ CPPEmitter.prototype = Object.create(Emitter.prototype, {
|
||||
YGAlignFlexEnd:{value:'YGAlignFlexEnd'},
|
||||
YGAlignFlexStart:{value:'YGAlignFlexStart'},
|
||||
YGAlignStretch:{value:'YGAlignStretch'},
|
||||
|
||||
YGAlignBaseline:{value:'YGAlignBaseline'},
|
||||
|
||||
YGDirectionInherit:{value:'YGDirectionInherit'},
|
||||
YGDirectionLTR:{value:'YGDirectionLTR'},
|
||||
|
@@ -96,6 +96,7 @@ CSEmitter.prototype = Object.create(Emitter.prototype, {
|
||||
YGAlignFlexEnd:{value:'YogaAlign.FlexEnd'},
|
||||
YGAlignFlexStart:{value:'YogaAlign.FlexStart'},
|
||||
YGAlignStretch:{value:'YogaAlign.Stretch'},
|
||||
YGAlignBaseline:{value:'YogaAlign.Baseline'},
|
||||
|
||||
YGDirectionInherit:{value:'YogaDirection.Inherit'},
|
||||
YGDirectionLTR:{value:'YogaDirection.LTR'},
|
||||
|
@@ -100,6 +100,7 @@ JavaEmitter.prototype = Object.create(Emitter.prototype, {
|
||||
YGAlignFlexEnd:{value:'YogaAlign.FLEX_END'},
|
||||
YGAlignFlexStart:{value:'YogaAlign.FLEX_START'},
|
||||
YGAlignStretch:{value:'YogaAlign.STRETCH'},
|
||||
YGAlignBaseline:{value:'YogaAlign.Baseline'},
|
||||
|
||||
YGDirectionInherit:{value:'YogaDirection.INHERIT'},
|
||||
YGDirectionLTR:{value:'YogaDirection.LTR'},
|
||||
|
@@ -84,6 +84,7 @@ JavascriptEmitter.prototype = Object.create(Emitter.prototype, {
|
||||
YGAlignFlexEnd:{value:'Yoga.ALIGN_FLEX_END'},
|
||||
YGAlignFlexStart:{value:'Yoga.ALIGN_FLEX_START'},
|
||||
YGAlignStretch:{value:'Yoga.ALIGN_STRETCH'},
|
||||
YGAlignBaseline:{value:'Yoga.ALIGN_BASELINE'},
|
||||
|
||||
YGDirectionInherit:{value:'Yoga.DIRECTION_INHERIT'},
|
||||
YGDirectionLTR:{value:'Yoga.DIRECTION_LTR'},
|
||||
|
@@ -377,6 +377,7 @@ function alignValue(e, value) {
|
||||
case 'stretch': return e.YGAlignStretch;
|
||||
case 'flex-start': return e.YGAlignFlexStart;
|
||||
case 'flex-end': return e.YGAlignFlexEnd;
|
||||
case 'baseline': return e.YGAlignBaseline;
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user