Permalink
Browse files

move info box to the top of the flame graph

  • Loading branch information...
davepacheco committed Jul 5, 2012
1 parent 37d85ed commit 024e177a98629624265f7d8da47b5a2a2023ac21
Showing with 4 additions and 4 deletions.
  1. +4 −4 lib/output-flamegraph-svg.js
@@ -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'];
@@ -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('--');

0 comments on commit 024e177

Please sign in to comment.