@@ -28,7 +28,7 @@ export const TooltipArrow = (props: {
28
28
classNames . push ( "bottom" ) ;
29
29
break ;
30
30
case "right" :
31
- if ( props . tooltipBottomOverflow ) {
31
+ if ( props . tooltipBottomOverflow . val ) {
32
32
// In this case, right would have fallen below the bottom of the screen.
33
33
// Modify so that the bottom of the tooltip connects with the target
34
34
classNames . push ( "left-bottom" ) ;
@@ -37,7 +37,7 @@ export const TooltipArrow = (props: {
37
37
}
38
38
break ;
39
39
case "left" :
40
- if ( props . tooltipBottomOverflow ) {
40
+ if ( props . tooltipBottomOverflow . val ) {
41
41
// In this case, left would have fallen below the bottom of the screen.
42
42
// Modify so that the bottom of the tooltip connects with the target
43
43
classNames . push ( "right-bottom" ) ;
@@ -226,7 +226,7 @@ const alignTooltip = (
226
226
case "right" :
227
227
tooltipLeft . val = `${ targetOffset . width + 20 } px` ;
228
228
229
- if ( tooltipBottomOverflow ) {
229
+ if ( tooltipBottomOverflow . val ) {
230
230
// In this case, right would have fallen below the bottom of the screen.
231
231
// Modify so that the bottom of the tooltip connects with the target
232
232
tooltipTop . val = `-${ tooltipHeight - targetOffset . height - 20 } px` ;
@@ -237,7 +237,7 @@ const alignTooltip = (
237
237
tooltipTop . val = "15px" ;
238
238
}
239
239
240
- if ( tooltipBottomOverflow ) {
240
+ if ( tooltipBottomOverflow . val ) {
241
241
// In this case, left would have fallen below the bottom of the screen.
242
242
// Modify so that the bottom of the tooltip connects with the target
243
243
tooltipTop . val = `-${ tooltipHeight - targetOffset . height - 20 } px` ;
@@ -353,7 +353,7 @@ export const Tooltip = (
353
353
// windowSize can change if the window is resized
354
354
const windowSize = dom . state ( getWindowSize ( ) ) ;
355
355
const targetOffset = dom . state < Offset > ( getOffset ( element ) ) ;
356
- const tooltipBottomOverflow = dom . derive (
356
+ const tooltipBottomOverflow = dom . derive < boolean > (
357
357
( ) => targetOffset . val ! . top + tooltipHeight . val ! > windowSize . val ! . height
358
358
) ;
359
359
0 commit comments