52 |
52 |
53 item.append("span") |
53 item.append("span") |
54 .text(function(d) { return d.name; }) |
54 .text(function(d) { return d.name; }) |
55 .style("text-align", "center") |
55 .style("text-align", "center") |
56 .style("display", function(d) { return d.children ? 'none' : 'inline-block'; }) |
56 .style("display", function(d) { return d.children ? 'none' : 'inline-block'; }) |
57 .style("width", function() { return $(this).parent().width() > $(this).width() ? $(this).parent().width() + 'px' : ''; }) |
57 .style("width", function() { return Ember.$(this).parent().width() > Ember.$(this).width() ? Ember.$(this).parent().width() + 'px' : ''; }) |
58 .style("text-transform", "capitalize") |
58 .style("text-transform", "capitalize") |
59 .style("font-size", "15px") |
59 .style("font-size", "15px") |
60 .style("margin-left", function() { return ( $(this).width() > $(this).parent().width() ? - ( $(this).width() / 2 ) + ( $(this).parent().width() / 2 ) : 0 ) + 'px'; }) |
60 .style("margin-left", function() { return ( Ember.$(this).width() > Ember.$(this).parent().width() ? - ( Ember.$(this).width() / 2 ) + ( Ember.$(this).parent().width() / 2 ) : 0 ) + 'px'; }) |
61 .style("margin-top", function() { return $(this).parent().height() / 2 - $(this).height() / 2 + 'px'; }); |
61 .style("margin-top", function() { return Ember.$(this).parent().height() / 2 - Ember.$(this).height() / 2 + 'px'; }); |
62 |
62 |
63 var svg = element.append("svg") |
63 var svg = element.append("svg") |
64 .style("width", width + "px") |
64 .style("width", width + "px") |
65 .style("height", width + "px") |
65 .style("height", width + "px") |
66 .attr("class", "bubble"); |
66 .attr("class", "bubble"); |