File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -52,7 +52,7 @@ var C3Chart = function (_React$Component) {
5252 mouse = d3 . mouse ( element ) ;
5353 if ( navigator . userAgent . indexOf ( "Firefox" ) != - 1 ) {
5454 // this works in Firefox
55- mouse = [ d3 . event . offsetX - tWidth / 2 + 20 , d3 . event . offsetY - tHeight - 20 ] ;
55+ mouse = [ d3 . event . offsetX - 80 , d3 . event . offsetY - 80 ] ;
5656 }
5757 // Determin tooltip position
5858 if ( forArc ) {
@@ -83,8 +83,10 @@ var C3Chart = function (_React$Component) {
8383 if ( tooltipTop < 0 ) {
8484 tooltipTop = 0 ;
8585 }
86+
8687 return { top : tooltipTop , left : tooltipLeft } ;
8788 } ;
89+
8890 this . updateChart ( this . props ) ;
8991 }
9092 } , {
Original file line number Diff line number Diff line change @@ -57,7 +57,7 @@ class C3Chart extends React.Component {
5757 mouse = d3 . mouse ( element ) ;
5858 if ( navigator . userAgent . indexOf ( "Firefox" ) != - 1 ) {
5959 // this works in Firefox
60- mouse = [ d3 . event . offsetX - tWidth / 2 + 20 , d3 . event . offsetY - tHeight - 20 ] ;
60+ mouse = [ d3 . event . offsetX - 80 , d3 . event . offsetY - 80 ] ;
6161 }
6262 // Determin tooltip position
6363 if ( forArc ) {
@@ -88,8 +88,10 @@ class C3Chart extends React.Component {
8888 if ( tooltipTop < 0 ) {
8989 tooltipTop = 0 ;
9090 }
91+
9192 return { top : tooltipTop , left : tooltipLeft } ;
9293 } ;
94+
9395 this . updateChart ( this . props ) ;
9496 }
9597
You can’t perform that action at this time.
0 commit comments