Skip to content

Commit

Permalink
Merge branch 'assembla-9a3865327d' into 'white/integracion'
Browse files Browse the repository at this point in the history
  • Loading branch information
Ezequieltbh committed Jul 6, 2017
2 parents 85b5eb8 + 9a38653 commit e632c68
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
4 changes: 4 additions & 0 deletions server/www/scripts/d3/directives/bar.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,10 @@ angular.module('faradayApp')
var colored = document.createElement('div');
colored.style = "background-color:" + d.color; // Color is safe (its value is in a whitelist)
colored.innerText = name;
while (element.firstChild) {
// https://stackoverflow.com/questions/3955229/remove-all-child-elements-of-a-dom-node-in-javascript
element.removeChild(element.firstChild);
}
element.appendChild(colored);
element.appendChild(document.createTextNode(d.value));
})
Expand Down
4 changes: 4 additions & 0 deletions server/www/scripts/d3/directives/cake.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,10 @@ angular.module('faradayApp')
var colored = document.createElement('div');
colored.style = "background-color:" + d.color; // Color is safe (its value is in a whitelist)
colored.innerText = d.key;
while (element.firstChild) {
// https://stackoverflow.com/questions/3955229/remove-all-child-elements-of-a-dom-node-in-javascript
element.removeChild(element.firstChild);
}
element.appendChild(colored);
element.appendChild(document.createTextNode(d.value));
})
Expand Down
4 changes: 4 additions & 0 deletions server/www/scripts/d3/directives/treemap.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,10 @@ angular.module('faradayApp')
var colored = document.createElement('div');
colored.style = "background-color:" + d.color; // Color is safe (its value is in a whitelist)
colored.innerText = d.name;
while (element.firstChild) {
// https://stackoverflow.com/questions/3955229/remove-all-child-elements-of-a-dom-node-in-javascript
element.removeChild(element.firstChild);
}
element.appendChild(colored);
element.appendChild(document.createTextNode(d.count));
})
Expand Down

0 comments on commit e632c68

Please sign in to comment.