Browse Source

Fix tooltip on edge

pull/104/head
Masayuki Tanaka 11 years ago
parent
commit
47988f204b
  1. 5
      c3.js
  2. 2
      c3.min.js

5
c3.js

@ -1499,7 +1499,7 @@
// don't show tooltip when no data // don't show tooltip when no data
if (dataToShow.length === 0) { return; } if (dataToShow.length === 0) { return; }
// Construct tooltip // Construct tooltip
tooltip.html(__tooltip_contents(selectedData, getXAxisTickFormat(), valueFormat, color)); tooltip.html(__tooltip_contents(selectedData, getXAxisTickFormat(), valueFormat, color)).style("display", "block");
// Get tooltip dimensions // Get tooltip dimensions
tWidth = tooltip.property('offsetWidth'); tWidth = tooltip.property('offsetWidth');
tHeight = tooltip.property('offsetHeight'); tHeight = tooltip.property('offsetHeight');
@ -1532,8 +1532,7 @@
// Set tooltip // Set tooltip
tooltip tooltip
.style("top", tooltipTop + "px") .style("top", tooltipTop + "px")
.style("left", tooltipLeft + 'px') .style("left", tooltipLeft + 'px');
.style("display", "block");
} }
function hideTooltip() { function hideTooltip() {
tooltip.style("display", "none"); tooltip.style("display", "none");

2
c3.min.js vendored

File diff suppressed because one or more lines are too long
Loading…
Cancel
Save