File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
src/components/tabController Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -168,7 +168,7 @@ class TabBar extends PureComponent {
168
168
get centerOffset ( ) {
169
169
const { centerSelected} = this . props ;
170
170
const guesstimateCenterValue = 60 ;
171
- return centerSelected ? Constants . screenWidth / 2 - guesstimateCenterValue : 0 ;
171
+ return centerSelected ? this . containerWidth / 2 - guesstimateCenterValue : 0 ;
172
172
}
173
173
174
174
measureItems = async ( ) => {
@@ -223,7 +223,7 @@ class TabBar extends PureComponent {
223
223
const { centerSelected} = this . props ;
224
224
const itemOffset = this . _itemsOffsets [ index ] ;
225
225
const itemWidth = this . _itemsWidths [ index ] ;
226
- const screenCenter = Constants . screenWidth / 2 ;
226
+ const screenCenter = this . containerWidth / 2 ;
227
227
228
228
if ( itemOffset && itemWidth ) {
229
229
if ( centerSelected ) {
You can’t perform that action at this time.
0 commit comments