Browse Source

Update c3.min.js

pull/929/head
Masayuki Tanaka 10 years ago
parent
commit
c47da0dbf5
  1. 17
      c3.js
  2. 10
      c3.min.js

17
c3.js

@ -616,7 +616,7 @@
});
}
if (duration) {
if (duration && $$.isTabVisible()) { // Only use transition if tab visible. See #938.
// transition should be derived from one transition
d3.transition().duration(duration).each(function () {
var transitionsToWait = [];
@ -957,6 +957,21 @@
return parsedDate;
};
c3_chart_internal_fn.isTabVisible = function () {
var hidden;
if (typeof document.hidden !== "undefined") { // Opera 12.10 and Firefox 18 and later support
hidden = "hidden";
} else if (typeof document.mozHidden !== "undefined") {
hidden = "mozHidden";
} else if (typeof document.msHidden !== "undefined") {
hidden = "msHidden";
} else if (typeof document.webkitHidden !== "undefined") {
hidden = "webkitHidden";
}
return document[hidden] ? false : true;
};
c3_chart_internal_fn.getDefaultConfig = function () {
var config = {
bindto: '#chart',

10
c3.min.js vendored

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