@@ -93,24 +93,25 @@ function showTooltip(e, tooltip) {
9393 // better for smaller displays
9494 tooltipElement . style . maxWidth = window . innerWidth * 2 / 3 + "px" ;
9595 tooltipElement . style . left = e . pageX - tooltipElement . getBoundingClientRect ( ) . width * e . pageX / window . innerWidth + "px" ;
96+ tooltipElement . style . right = '' ;
9697 } else {
97- tooltipElement . style . maxWidth = window . innerWidth / 2 + "px" ;
98+ tooltipElement . style . maxWidth = window . innerWidth / 2 - 40 + "px" ;
9899 if ( e . pageX + 20 < window . innerWidth - tooltipElement . getBoundingClientRect ( ) . width ) {
99- tooltipElement . style . left = e . pageX + 20 + "px" ;
100+ tooltipElement . style . left = e . pageX + 10 + "px" ;
100101 tooltipElement . style . right = '' ;
101102 } else {
102103 tooltipElement . style . left = '' ;
103- tooltipElement . style . right = window . innerWidth - e . pageX + 20 + "px" ;
104+ tooltipElement . style . right = window . innerWidth - e . pageX + 10 + "px" ;
104105 }
105106 }
106107 if ( e . pageY + 20 < window . innerHeight - tooltipElement . getBoundingClientRect ( ) . height ) {
107- tooltipElement . style . top = e . pageY + 20 + "px" ;
108+ tooltipElement . style . top = e . pageY + 10 + "px" ;
108109 tooltipElement . style . bottom = '' ;
109110 } else {
110111 tooltipElement . style . top = '' ;
111- tooltipElement . style . bottom = window . innerHeight - e . pageY + 20 + "px" ;
112+ tooltipElement . style . bottom = window . innerHeight - e . pageY + 10 + "px" ;
112113 }
113- tooltipElement . style . opacity = 1 ;
114+ tooltipElement . style . opacity = 0.95 ;
114115}
115116
116117function registerTooptip ( element , tooltip ) {
0 commit comments