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.withUpdateOrgXDomain = true;
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)
updateSizes();
// MEMO: called in updateLegend in redraw if withLegend
@ -4334,7 +4335,7 @@
updateScales();
updateSvgSize();
// Update g positions
transformAll(options.withTransition, transitions);
transformAll(options.withTransitionForTransform, transitions);
}
// Draw with new sizes & scales
redraw(options, transitions);
@ -4810,10 +4811,12 @@
}
}
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;
setTargetType(targetIds, type);
updateAndRedraw(optionsForRedraw || {withTransitionForAxis: withTransitionForAxis});
updateAndRedraw(options);
}
c3.focus = function (targetId) {

4
c3.min.js vendored

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