Skip to content

Commit

Permalink
move info box to the top of the flame graph
Browse files Browse the repository at this point in the history
  • Loading branch information
Dave Pacheco committed Jul 5, 2012
1 parent 37d85ed commit 024e177
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/output-flamegraph-svg.js
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ FlameGraphEmitter.prototype.draw = function (callback)
var fontsize = this.fge_params['font_size'];

var xpad = 10;
var ypadtop = fontsize * 4;
var ypadtop = fontsize * 4 + fontsize * 2 + 10;
var ypadbtm = fontsize * 2 + 10;

var width = this.fge_params['width'];
Expand Down Expand Up @@ -288,11 +288,11 @@ FlameGraphEmitter.prototype.draw = function (callback)
emitString(xml, black, fontface, fontsize + 5, Math.floor(width / 2),
fontsize * 2, this.fge_params['title'], 'middle', {});

emitString(xml, black, fontface, fontsize, xpad, height - (ypadbtm / 2),
'Function:', 'left', {});
emitString(xml, black, fontface, fontsize, xpad,
ypadtop - ypadbtm, 'Function:', 'left', {});

emitString(xml, black, fontface, fontsize, xpad + 60,
height - (ypadbtm / 2), ' ', 'left', { 'id': 'details' });
ypadtop - ypadbtm, ' ', 'left', { 'id': 'details' });

for (var ident in this.fge_boxes) {
var parts = ident.split('--');
Expand Down

0 comments on commit 024e177

Please sign in to comment.