File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -363,13 +363,15 @@ class Hint extends Component<HintProps, HintState> {
363
363
tipPositionStyle . top = this . hintOffset - this . tipSize . height ;
364
364
}
365
365
366
- if ( this . targetLayout ?. width && this . targetLayout ?. x ) {
367
- const targetMidWidth = this . targetLayout . width / 2 ;
366
+ const layoutWidth = this . targetLayout ?. width || 0 ;
367
+
368
+ if ( this . targetLayout ?. x ) {
369
+ const targetMidWidth = layoutWidth / 2 ;
368
370
const tipMidWidth = this . tipSize . width / 2 ;
369
371
370
372
const leftPosition = this . useSideTip ? this . targetLayout . x : this . targetLayout . x + targetMidWidth - tipMidWidth ;
371
373
const rightPosition = this . useSideTip
372
- ? this . containerWidth - this . targetLayout . x - this . targetLayout . width
374
+ ? this . containerWidth - this . targetLayout . x - layoutWidth
373
375
: this . containerWidth - this . targetLayout . x - targetMidWidth - tipMidWidth ;
374
376
const targetPositionOnScreen = this . getTargetPositionOnScreen ( ) ;
375
377
You can’t perform that action at this time.
0 commit comments