Browse Source

Disable transition when resize

pull/1/head
Masayuki Tanaka 11 years ago
parent
commit
70ccd2df53
  1. 2
      c3.js
  2. 2
      c3.min.js

2
c3.js

@ -1373,7 +1373,7 @@
d3.select('#'+clipId).select('rect').attr('width', width);
d3.select('#xaxis-clip').select('rect').attr('width', width + 2);
// Draw with new sizes & scales
redraw();
redraw({withTransition:false});
}
function updateTargets (targets) {

2
c3.min.js vendored

@ -56,4 +56,4 @@ a&&ba(a.cacheIds))wa(ca(a.cacheIds),a.done);else if("data"in a)wa(I(data),a.done
0<k.data.targets.length&&G()};k.selected=function(a){a=m(a)?"-"+a:"";return d3.merge(h.selectAll(".-shapes"+a).selectAll(".-shape").filter(function(){return d3.select(this).classed(X)}).map(function(a){return a.map(function(a){return a.__data__})}))};k.select=function(a,b,c){V&&h.selectAll(".-shapes").selectAll(".-shape").each(function(d,f){var g="circle"===this.nodeName?Hb:mc,h="circle"===this.nodeName?Ya:Jb;0<=b.indexOf(f)?aa(d)&&($||r(a)||0<=a.indexOf(d.id))&&g(d3.select(this).classed(X,!0),d,
f):m(c)&&c&&h(d3.select(this).classed(X,!1),d,f)})};k.unselect=function(a,b){V&&h.selectAll(".-shapes").selectAll(".-shape").each(function(c,d){var f="circle"===this.nodeName?Ya:Jb;(r(b)||0<=b.indexOf(d))&&aa(c)&&($||r(a)||0<=a.indexOf(c.id))&&f(d3.select(this).classed(X,!1),c,d)})};k.toLine=function(a){Wa(a,"line");G()};k.toSpline=function(a){Wa(a,"spline");G()};k.toBar=function(a){Wa(a,"bar");G()};k.groups=function(a){if(r(a))return t;t=a;G();return t};k.regions=function(a){if(r(a))return H;H=a;
G();return H};k.regions.add=function(a){if(r(a))return H;H=H.concat(a);G();return H};k.regions.remove=function(a,b){var c=[].concat(a);b=m(b)?b:{};c.forEach(function(a){var c=d3.selectAll("."+a);m(b.duration)&&(c=c.transition().duration(b.duration).style("fill-opacity",0));c.remove();H=H.filter(function(b){return 0>b.classes.indexOf(a)})});return H};k.data.get=function(a){a=k.data.getAsTarget(a);return m(a)?a.values.map(function(a){return a.value}):void 0};k.data.getAsTarget=function(a){var b=Ha(function(b){return b.id==
a});return 0<b.length?b[0]:void 0};if("url"in x.data)d3.csv(x.data.url,function(a,b){Za(b)});else if("rows"in x.data)Za(ja(x.data.rows));else if("columns"in x.data)Za(ka(x.data.columns));else throw Error("url or rows or columns is required.");jb.onresize=function(){M();P();d3.select("svg").attr("width",p+J+B);d3.select("#"+hb).select("rect").attr("width",p);d3.select("#xaxis-clip").select("rect").attr("width",p+2);G()};return k}})(window);
a});return 0<b.length?b[0]:void 0};if("url"in x.data)d3.csv(x.data.url,function(a,b){Za(b)});else if("rows"in x.data)Za(ja(x.data.rows));else if("columns"in x.data)Za(ka(x.data.columns));else throw Error("url or rows or columns is required.");jb.onresize=function(){M();P();d3.select("svg").attr("width",p+J+B);d3.select("#"+hb).select("rect").attr("width",p);d3.select("#xaxis-clip").select("rect").attr("width",p+2);G({withTransition:!1})};return k}})(window);

Loading…
Cancel
Save