Browse Source

Fix region update

pull/1/head
Masayuki Tanaka 12 years ago committed by masayuki
parent
commit
a94ba1f3e8
  1. 11
      c3.js

11
c3.js

@ -1248,22 +1248,13 @@
// rect for regions
mainRegion = main.select('.regions').selectAll('rect.region')
.data(__regions)
mainRegion
.attr('class', classRegion)
.transition().duration(withTransition ? 250 : 0)
.attr("x", __axis_rotated ? 0 : regionStart)
.attr("y", __axis_rotated ? regionStart : margin.top)
.attr("width", __axis_rotated ? width : regionWidth)
.attr("height", __axis_rotated ? regionWidth : height)
mainRegion.enter().append('rect')
mainRegion
.attr('class', classRegion)
.attr("x", __axis_rotated ? 0 : regionStart)
.attr("y", __axis_rotated ? regionStart : margin.top)
.attr("width", __axis_rotated ? width : regionWidth)
.attr("height", __axis_rotated ? regionWidth : height)
.attr("opacity", 0)
.transition().duration(withTransition ? 250 : 0)
.attr("opacity", 1)
mainRegion.exit().transition().duration(withTransition ? 250 : 0)
.attr("opacity", 0)
.remove()

Loading…
Cancel
Save