Build: 8.0.2 (b2019060511)
OS: Windows 10
If I use an “Embedded View” component the views.Image.style.textAlign is respected.
demo:
https:/uploads/iatesting/original/2X/8/8cd1a23e7ebb4161fccea9253a1d62f02f73b40e.mp4
Am I overlooking something here? I’d like the image to stay centered when using a carousel component.
Thanks!
textAlign actually is honored in Carousel, it just happens that you’ve found an instance where we mistakenly apply the textAlign setting to the image within the Image component (I’ll be opening a bug for this).
If you were to follow the same steps with a Label component, the text would be centered in both the Carousel and the Embedded View.
If you want an image to be centered in both the Carousel and the Embedded View, you’d be best-served by placing the Image in a View built from a Flex Container where the Flex Container has props.direction
set to “column” and props.alignItems
set to “center”. Then supply the path for this View in the Carousel and Embedded View.
1 Like
By doing your suggestion it made all other components in that view unfavorably narrow.
What I ended up doing was place another Flex Container inside the the Flex View; and then followed your suggestion and now the image stays centered in the Carousel.
Thanks, cheers!
1 Like
Ah, yes, I didn’t know you had other components along for the ride.
1 Like