Browse Source

Fix tooltip position on right edge on Firefox

pull/1053/head
Masayuki Tanaka 10 years ago
parent
commit
7d8a949a70
  1. 3
      c3.js
  2. 2
      c3.min.js
  3. 3
      src/tooltip.js

3
c3.js

@ -3745,7 +3745,8 @@
} }
if (tooltipRight > chartRight) { if (tooltipRight > chartRight) {
tooltipLeft -= tooltipRight - chartRight; // 20 is needed for Firefox to keep tooletip width
tooltipLeft -= tooltipRight - chartRight + 20;
} }
if (tooltipTop + tHeight > $$.currentHeight) { if (tooltipTop + tHeight > $$.currentHeight) {
tooltipTop -= tHeight + 30; tooltipTop -= tHeight + 30;

2
c3.min.js vendored

File diff suppressed because one or more lines are too long

3
src/tooltip.js

@ -75,7 +75,8 @@ c3_chart_internal_fn.tooltipPosition = function (dataToShow, tWidth, tHeight, el
} }
if (tooltipRight > chartRight) { if (tooltipRight > chartRight) {
tooltipLeft -= tooltipRight - chartRight; // 20 is needed for Firefox to keep tooletip width
tooltipLeft -= tooltipRight - chartRight + 20;
} }
if (tooltipTop + tHeight > $$.currentHeight) { if (tooltipTop + tHeight > $$.currentHeight) {
tooltipTop -= tHeight + 30; tooltipTop -= tHeight + 30;

Loading…
Cancel
Save