Eugnis / react-native-timeline-flatlist

FlatList based timeline component for React Native for iOS and Android
https://www.npmjs.com/package/react-native-timeline-flatlist
MIT License
478 stars 69 forks source link

[iOS]: timeline line connecting two consecutive dots is not rendering perfectly. #13

Open jayrajkachariya opened 4 years ago

jayrajkachariya commented 4 years ago

The line connecting two dots at index 12 is not rendering in center, but slight right side. I have implemented basic scenario where i am passing time and title as props not description and extra styling.

<Timeline
        data={timelineData.map(x => ({
            time: new Date(x.timeToLeave),
            title: x.name
        }))}
/>
Screenshot 2020-03-11 at 5 28 27 PM
Eugnis commented 4 years ago

That may happen if time texts have different widths. To prevent this you need to pass to Timeline timeContainerStyle prop with custom minWidth. For example, timeContainerStyle={{ minWidth: 52 }}