Commit 2d686129 authored by Masayuki Tanaka's avatar Masayuki Tanaka

Fix axis transition when transform

parent 5b6b5a26
...@@ -4325,6 +4325,7 @@ ...@@ -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 @@ ...@@ -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 @@ ...@@ -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) {
......
This source diff could not be displayed because it is too large. You can view the blob instead.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment