Skip to content

Commit acfb1de

Browse files
author
Robert Jackson
committed
Ensure swapping graphData clears and restarts.
1 parent 8235ab3 commit acfb1de

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

app/components/basic-tree.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,10 @@ export default Ember.Component.extend({
5353
},
5454

5555
drawTree(data) {
56-
let svg = select(this.element.querySelector('.svg-container'))
56+
let svgContainer = this.element.querySelector('.svg-container');
57+
svgContainer.innerHTML = '';
58+
59+
let svg = select(svgContainer)
5760
.append("svg")
5861
.attr("preserveAspectRatio", "xMinYMin meet")
5962
.attr("viewBox", "0 0 300 300")

0 commit comments

Comments
 (0)