Improved <ImageBackground>
Reviewed By: sahrens Differential Revision: D5214113 fbshipit-source-id: 1eca2347f97a1ff13f71906688a33b9ed7a3a7f4
This commit is contained in:
parent
c78ddf2c3d
commit
7707905550
|
@ -55,6 +55,15 @@ class ImageBackground extends React.Component {
|
||||||
right: 0,
|
right: 0,
|
||||||
top: 0,
|
top: 0,
|
||||||
bottom: 0,
|
bottom: 0,
|
||||||
|
// Temporary Workaround:
|
||||||
|
// Current (imperfect yet) implementation of <Image> overwrites width and height styles
|
||||||
|
// (which is not quite correct), and these styles conflict with explicitly set styles
|
||||||
|
// of <ImageBackground> and with our internal layout model here.
|
||||||
|
// So, we have to proxy/reapply these styles explicitly for actual <Image> component.
|
||||||
|
// This workaround should be removed after implementing proper support of
|
||||||
|
// intrinsic content size of the <Image>.
|
||||||
|
width: style.width,
|
||||||
|
height: style.height,
|
||||||
},
|
},
|
||||||
imageStyle,
|
imageStyle,
|
||||||
]}
|
]}
|
||||||
|
|
Loading…
Reference in New Issue