|
|
@ -288,12 +288,20 @@ c3_chart_internal_fn.initWithData = function (data) { |
|
|
|
window.onresize = $$.generateResize(); |
|
|
|
window.onresize = $$.generateResize(); |
|
|
|
} |
|
|
|
} |
|
|
|
if (window.onresize.add) { |
|
|
|
if (window.onresize.add) { |
|
|
|
|
|
|
|
var timeout; |
|
|
|
window.onresize.add(function () { |
|
|
|
window.onresize.add(function () { |
|
|
|
config.onresize.call($$); |
|
|
|
config.onresize.call($$); |
|
|
|
}); |
|
|
|
}); |
|
|
|
window.onresize.add(function () { |
|
|
|
if (config.auto_resize) { |
|
|
|
$$.api.flush(); |
|
|
|
window.onresize.add(function () { |
|
|
|
}); |
|
|
|
if (timeout !== undefined) { |
|
|
|
|
|
|
|
clearTimeout(timeout); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
timeout = setTimeout(function () { |
|
|
|
|
|
|
|
$$.api.flush(); |
|
|
|
|
|
|
|
}, 100); |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
} |
|
|
|
window.onresize.add(function () { |
|
|
|
window.onresize.add(function () { |
|
|
|
config.onresized.call($$); |
|
|
|
config.onresized.call($$); |
|
|
|
}); |
|
|
|
}); |
|
|
|