Skip to content

Commit

Permalink
Fix bug : show the differences between transition.select and transiti…
Browse files Browse the repository at this point in the history
…on.selectAll
  • Loading branch information
tianxuzhang committed Nov 3, 2015
1 parent 5d30cac commit 5837e91
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions core/transition/transition.select.html
Expand Up @@ -22,9 +22,12 @@

//追加测试元素
svg.append('g').attr('transform', 'translate(0, 0)')
.selectAll('rect')
.data([50,250])
.enter()
.append('rect')
.attr({
x: 50, y: 50, width: 50, height: 50
x: function(d){ return d;}, y: 50, width: 50, height: 50
});

//
Expand All @@ -33,7 +36,7 @@
.duration(500) //设置动画持续时间500毫秒
.attr('transform', "translate(0, 50)") //设置过渡结束时矩形向下平移50个像素
.select('rect')
.attr('width', 100);//设置矩形过渡结束后的宽为100
.attr('width', 100);//设置矩形过渡结束后的宽为100
</script>
</body>
</html>
</html>

0 comments on commit 5837e91

Please sign in to comment.