kill the svg namespace, d3 uses createElementNS

This commit is contained in:
Justin Palmer
2013-02-01 15:22:08 -08:00
parent 4e60bf6501
commit 672a4a17a7

View File

@@ -144,10 +144,10 @@ class CommandLoggerView extends ScrollView
.append('div')
.style('width', "#{w}px")
.style('height', "#{h}px")
.append('svg:svg')
.append('svg')
.attr('width', w)
.attr('height', h)
.append('svg:g')
.append('g')
.attr('transform', 'translate(.5,.5)')
nodes = treemap.nodes(root).filter((d) -> not d.children)
@@ -155,17 +155,17 @@ class CommandLoggerView extends ScrollView
cell = svg.selectAll('g')
.data(nodes)
.enter()
.append('svg:g')
.append('g')
.attr('class', 'node')
.attr('transform', (d) -> "translate(#{d.x},#{d.y})")
.on('click', (d) -> if node is d.parent then zoom(root) else zoom(d.parent))
cell.append('svg:rect')
cell.append('rect')
.attr('width', (d) -> d.dx - 1)
.attr('height', (d) -> d.dy - 1)
.style('fill', (d) -> color(d.parent.name))
cell.append('svg:foreignObject')
cell.append('foreignObject')
.attr('width', (d) -> d.dx - 1)
.attr('height', (d) -> d.dy - 1)
.attr('class', 'foreign-object')