Skip to content

Commit 815e06a

Browse files
committed
fixes
1 parent 7c4a4f2 commit 815e06a

File tree

2 files changed

+7
-14
lines changed

2 files changed

+7
-14
lines changed

app/components/flame-graph.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,8 @@ export default Ember.Component.extend({
6060
subTree = this.convert(child);
6161
if (subTree) {
6262
node.children.push(subTree);
63+
treeValue += subTree.treeValue;
6364
}
64-
treeValue += subTree.treeValue;
6565
}
6666
node.treeValue = treeValue;
6767
node.time = this.formatTime(node.treeValue);
@@ -81,7 +81,7 @@ export default Ember.Component.extend({
8181
for (let p in obj) {
8282
if (obj.hasOwnProperty(p) && p !== 'own') {
8383
if (typeof obj[p] === 'object') {
84-
if (p !== 'time') {
84+
if (p !== 'time' || (p === 'time' && Object.keys(obj[p]).length > 1)) {
8585
let padded = p + pad.repeat(13).substring(0, pad.length * 13 - p.length * 6);
8686
str += '&nbsp;'.repeat(indent) + padded + (indent <= 0 ? '<br/>' : '') + objToString(obj[p]);
8787
}
@@ -105,8 +105,7 @@ export default Ember.Component.extend({
105105
let time = _this.formatTime(d.data.treeValue);
106106
let percent = " [" + (((d.data.treeValue / _this.get('totalTime')) * 100).toFixed(1)) + "%]";
107107
let self = " (self: " + _this.formatTime(d.data.stats.time.self) + ")";
108-
let res = d.data.name + "<br/>" + time + percent + self + "<br/>" + objToString(d.data.stats);
109-
return res;
108+
return d.data.name + "<br/>" + time + percent + self + "<br/>" + objToString(d.data.stats);
110109
};
111110

112111
let clientHeight = document.getElementsByClassName('flame-graph')[0].clientHeight;

app/styles/app.css

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,10 @@
11
body {
2-
/*margin-top: 3.5rem;*/
2+
margin-top: 3.5rem;
33
}
44

55
html,
6-
body {
7-
height: 100%;
8-
}
9-
10-
body > [class="ember-view"] {
11-
height: 100%;
12-
}
13-
6+
body,
7+
body > [class="ember-view"],
148
.flame-graph {
159
height: 100%;
1610
}
@@ -55,7 +49,7 @@ body > [class="ember-view"] {
5549
display: inline-block;
5650
position: relative;
5751
width: 100%;
58-
/*padding-bottom: 100%;*/
52+
padding-bottom: 100%;
5953
vertical-align: top;
6054
overflow: hidden;
6155
cursor: move;

0 commit comments

Comments
 (0)