nativescript-cradleTabBar
nativescript-cradleTabBar copied to clipboard
Circle Button kind of "off" on iPad
When running on iPad, the circle button seems "off" when it is panned to right or to the left. Index 2 (middle) is fine...

My work around was:
getTabTranslateX(index: number): number {
//return index * screen.mainScreen.widthDIPs / this.tabList.length - (screen.mainScreen.widthDIPs / 2) + (80 / 2);
const ratio = 5.1375;
return index * screen.mainScreen.widthDIPs / this.tabList.length - ( screen.mainScreen.widthDIPs / 2 ) + ( ( screen.mainScreen.widthDIPs / ratio ) / 2 )
}
@maxlam79 Thanks, for reporting this and providing a workaround. I'll update the code to take into account ipad screen sizes