Browse Source

Fixed getParentRectValue exception in IE #712

pull/1003/head
Darko Kukovec 10 years ago
parent
commit
420172b6ac
  1. 10
      c3.js
  2. 2
      c3.min.js
  3. 10
      src/size.js

10
c3.js

@ -2578,10 +2578,12 @@
c3_chart_internal_fn.getParentRectValue = function (key) {
var parent = this.selectChart.node(), v;
while (parent && parent.tagName !== 'BODY') {
v = parent.getBoundingClientRect()[key];
if (v) {
break;
}
try {
v = parent.getBoundingClientRect()[key];
if (v) {
break;
}
} catch(e) {}
parent = parent.parentNode;
}
return v;

2
c3.min.js vendored

File diff suppressed because one or more lines are too long

10
src/size.js

@ -44,10 +44,12 @@ c3_chart_internal_fn.getCurrentPaddingRight = function () {
c3_chart_internal_fn.getParentRectValue = function (key) {
var parent = this.selectChart.node(), v;
while (parent && parent.tagName !== 'BODY') {
v = parent.getBoundingClientRect()[key];
if (v) {
break;
}
try {
v = parent.getBoundingClientRect()[key];
if (v) {
break;
}
} catch(e) {}
parent = parent.parentNode;
}
return v;

Loading…
Cancel
Save