Browse Source

Fix axis transition when transform

pull/373/merge
Masayuki Tanaka 11 years ago
parent
commit
2d68612905
  1. 9
      c3.js
  2. 4
      c3.min.js

9
c3.js

@ -4325,6 +4325,7 @@
options.withUpdateXDomain = true; options.withUpdateXDomain = true;
options.withUpdateOrgXDomain = true; options.withUpdateOrgXDomain = true;
options.withTransitionForExit = false; options.withTransitionForExit = false;
options.withTransitionForTransform = getOption(options, "withTransitionForTransform", options.withTransition);
// MEMO: this needs to be called before updateLegend and it means this ALWAYS needs to be called) // MEMO: this needs to be called before updateLegend and it means this ALWAYS needs to be called)
updateSizes(); updateSizes();
// MEMO: called in updateLegend in redraw if withLegend // MEMO: called in updateLegend in redraw if withLegend
@ -4334,7 +4335,7 @@
updateScales(); updateScales();
updateSvgSize(); updateSvgSize();
// Update g positions // Update g positions
transformAll(options.withTransition, transitions); transformAll(options.withTransitionForTransform, transitions);
} }
// Draw with new sizes & scales // Draw with new sizes & scales
redraw(options, transitions); redraw(options, transitions);
@ -4810,10 +4811,12 @@
} }
} }
function transformTo(targetIds, type, optionsForRedraw) { function transformTo(targetIds, type, optionsForRedraw) {
var withTransitionForAxis = !hasArcType(c3.data.targets); var withTransitionForAxis = !hasArcType(c3.data.targets),
options = optionsForRedraw || {withTransitionForAxis: withTransitionForAxis};
options.withTransitionForTransform = false;
transiting = false; transiting = false;
setTargetType(targetIds, type); setTargetType(targetIds, type);
updateAndRedraw(optionsForRedraw || {withTransitionForAxis: withTransitionForAxis}); updateAndRedraw(options);
} }
c3.focus = function (targetId) { c3.focus = function (targetId) {

4
c3.min.js vendored

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