right and negative margin
This commit is contained in:
@@ -484,7 +484,8 @@ var computeLayout = (function() {
|
||||
if (!leadingPos && trailingPos) {
|
||||
child.layout[pos[crossAxis]] =
|
||||
node.layout[dim[crossAxis]] -
|
||||
getDimWithMargin(child, crossAxis) -
|
||||
child.layout[dim[crossAxis]] -
|
||||
getMargin(child, trailing[crossAxis]) -
|
||||
getPosition(child, trailing[crossAxis]);
|
||||
}
|
||||
} else {
|
||||
|
@@ -917,6 +917,17 @@ describe('Layout', function() {
|
||||
);
|
||||
});
|
||||
|
||||
it('should layout with position absolute right and negative margin', function() {
|
||||
testLayout(
|
||||
{style: {}, children: [
|
||||
{style: {right: 20, marginLeft: 5, marginRight: -5, width: 5, position: 'absolute'}}
|
||||
]},
|
||||
{width: 0, height: 0, top: 0, left: 0, children: [
|
||||
{width: 5, height: 0, top: 0, left: -20}
|
||||
]}
|
||||
);
|
||||
});
|
||||
|
||||
xit('should layout text with alignItems: stretch', function() {
|
||||
testLayout(
|
||||
{style: {width: 80, padding: 7, alignItems: 'stretch', measure: text('loooooooooong with space')}},
|
||||
|
Reference in New Issue
Block a user