@@ -291,7 +291,7 @@ class Hint extends Component<HintProps, HintState> {
291
291
}
292
292
293
293
getTargetPositionOnScreen ( ) {
294
- if ( this . targetLayout ?. x && this . targetLayout ?. width ) {
294
+ if ( this . targetLayout ?. x !== undefined && this . targetLayout ?. width ) {
295
295
const targetMidPosition = this . targetLayout . x + this . targetLayout . width / 2 ;
296
296
297
297
if ( targetMidPosition > this . containerWidth * ( 2 / 3 ) ) {
@@ -314,7 +314,7 @@ class Hint extends Component<HintProps, HintState> {
314
314
const { position} = this . props ;
315
315
const hintPositionStyle : HintPositionStyle = { alignItems : 'center' } ;
316
316
317
- if ( this . targetLayout ?. x ) {
317
+ if ( this . targetLayout ?. x !== undefined ) {
318
318
hintPositionStyle . left = - this . targetLayout . x ;
319
319
}
320
320
@@ -337,7 +337,7 @@ class Hint extends Component<HintProps, HintState> {
337
337
getHintPadding ( ) {
338
338
const paddings : Paddings = { paddingVertical : this . hintOffset , paddingHorizontal : this . edgeMargins } ;
339
339
340
- if ( this . useSideTip && this . targetLayout ?. x ) {
340
+ if ( this . useSideTip && this . targetLayout ?. x !== undefined ) {
341
341
const targetPositionOnScreen = this . getTargetPositionOnScreen ( ) ;
342
342
if ( targetPositionOnScreen === TARGET_POSITIONS . LEFT ) {
343
343
paddings . paddingLeft = this . targetLayout . x ;
@@ -376,7 +376,7 @@ class Hint extends Component<HintProps, HintState> {
376
376
377
377
const layoutWidth = this . targetLayout ?. width || 0 ;
378
378
379
- if ( this . targetLayout ?. x ) {
379
+ if ( this . targetLayout ?. x !== undefined ) {
380
380
const targetMidWidth = layoutWidth / 2 ;
381
381
const tipMidWidth = this . tipSize . width / 2 ;
382
382
0 commit comments