Browse Source

Remove resize_timeout option

pull/1207/head
Masayuki Tanaka 10 years ago
parent
commit
f8f7255ad1
  1. 17
      c3.js
  2. 4
      c3.min.js
  3. 1
      src/config.js
  4. 16
      src/core.js

17
c3.js

@ -931,17 +931,13 @@
}); });
if (config.resize_auto) { if (config.resize_auto) {
$$.resizeFunction.add(function () { $$.resizeFunction.add(function () {
if (config.resize_timeout) { if ($$.resizeTimeout !== undefined) {
if ($$.resizeTimeout !== undefined) { window.clearTimeout($$.resizeTimeout);
window.clearTimeout($$.resizeTimeout);
}
$$.resizeTimeout = window.setTimeout(function () {
delete $$.resizeTimeout;
$$.api.flush();
}, config.resize_timeout);
} else {
$$.api.flush();
} }
$$.resizeTimeout = window.setTimeout(function () {
delete $$.resizeTimeout;
$$.api.flush();
}, 100);
}); });
} }
$$.resizeFunction.add(function () { $$.resizeFunction.add(function () {
@ -1066,7 +1062,6 @@
padding_top: undefined, padding_top: undefined,
padding_bottom: undefined, padding_bottom: undefined,
resize_auto: true, resize_auto: true,
resize_timeout: 100,
zoom_enabled: false, zoom_enabled: false,
zoom_extent: undefined, zoom_extent: undefined,
zoom_privileged: false, zoom_privileged: false,

4
c3.min.js vendored

File diff suppressed because one or more lines are too long

1
src/config.js

@ -8,7 +8,6 @@ c3_chart_internal_fn.getDefaultConfig = function () {
padding_top: undefined, padding_top: undefined,
padding_bottom: undefined, padding_bottom: undefined,
resize_auto: true, resize_auto: true,
resize_timeout: 100,
zoom_enabled: false, zoom_enabled: false,
zoom_extent: undefined, zoom_extent: undefined,
zoom_privileged: false, zoom_privileged: false,

16
src/core.js

@ -926,17 +926,13 @@ c3_chart_internal_fn.bindResize = function () {
}); });
if (config.resize_auto) { if (config.resize_auto) {
$$.resizeFunction.add(function () { $$.resizeFunction.add(function () {
if (config.resize_timeout) { if ($$.resizeTimeout !== undefined) {
if ($$.resizeTimeout !== undefined) { window.clearTimeout($$.resizeTimeout);
window.clearTimeout($$.resizeTimeout);
}
$$.resizeTimeout = window.setTimeout(function () {
delete $$.resizeTimeout;
$$.api.flush();
}, config.resize_timeout);
} else {
$$.api.flush();
} }
$$.resizeTimeout = window.setTimeout(function () {
delete $$.resizeTimeout;
$$.api.flush();
}, 100);
}); });
} }
$$.resizeFunction.add(function () { $$.resizeFunction.add(function () {

Loading…
Cancel
Save