Permalink
Browse files

Recompute text sizes on redraw

  • Loading branch information...
hadley committed Dec 7, 2012
1 parent c07d88c commit 8660f01daf0773311abe2d53f1954be2231f979d
Showing with 5 additions and 4 deletions.
  1. +3 −2 inst/d3/profr.coffee
  2. +2 −2 inst/d3/profr.js
View
@@ -117,10 +117,11 @@ redraw = ->
# text.exit().remove()
# text.transition()
- text
+ svg.selectAll("g").data(data, id).selectAll("text")
.each((d) -> this.__width = this.getBBox().width)
- .style("opacity", (d) ->
+ .style("opacity", (d, i) ->
w = this.__width
+ # if i == 1 then console.log(w + " / " + width(d))
if w != 0 and w + 8 < width(d) then 1 else 0
)
View

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.

0 comments on commit 8660f01

Please sign in to comment.