flamegraph

Fork of flamegraph without J***S*****.
git clone git://git.laack.co/flamegraph.git
Log | Files | Refs | README

commit 6a2b684549750a6e93a11fe2b0e25be738f22379
parent b5893271a90d49cf3f54dc98062201da3510f78a
Author: Brendan Gregg <brendan.d.gregg@gmail.com>
Date:   Mon, 20 Oct 2014 12:24:08 -0700

make opacity work in Firefox, not just Chrome

Diffstat:
Mflamegraph.pl | 10+++++-----
1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/flamegraph.pl b/flamegraph.pl @@ -513,7 +513,7 @@ my $inc = <<INC; var ratio = (svg.width.baseVal.value - 2*$xpad) / width; var unzoombtn = document.getElementById("unzoom"); - unzoombtn.style["fill-opacity"] = "1.0"; + unzoombtn.style["opacity"] = "1.0"; var el = document.getElementsByTagName("g"); for(var i=0;i<el.length;i++){ @@ -525,7 +525,7 @@ my $inc = <<INC; if (parseFloat(a["y"].value) > ymin) { // Direct ancestor if (ex <= xmin && (ex+ew) >= xmax) { - e.style["fill-opacity"] = "0.5"; + e.style["opacity"] = "0.5"; zoom_parent(e); e.onclick = function(e){unzoom(); zoom(this);}; update_text(e); @@ -550,12 +550,12 @@ my $inc = <<INC; } function unzoom() { var unzoombtn = document.getElementById("unzoom"); - unzoombtn.style["fill-opacity"] = "0.0"; + unzoombtn.style["opacity"] = "0.0"; var el = document.getElementsByTagName("g"); for(i=0;i<el.length;i++) { el[i].style["display"] = "block"; - el[i].style["fill-opacity"] = "1"; + el[i].style["opacity"] = "1"; zoom_reset(el[i]); update_text(el[i]); } @@ -573,7 +573,7 @@ my ($white, $black, $vvdgrey, $vdgrey) = ( ); $im->stringTTF($black, $fonttype, $fontsize + 5, 0.0, int($imagewidth / 2), $fontsize * 2, $titletext, "middle"); $im->stringTTF($black, $fonttype, $fontsize, 0.0, $xpad, $imageheight - ($ypad2 / 2), " ", "", 'id="details"'); -$im->stringTTF($black, $fonttype, $fontsize, 0.0, $xpad, $fontsize * 2, "Reset Zoom", "", 'id="unzoom" onclick="unzoom()" style="fill-opacity:0.0"'); +$im->stringTTF($black, $fonttype, $fontsize, 0.0, $xpad, $fontsize * 2, "Reset Zoom", "", 'id="unzoom" onclick="unzoom()" style="opacity:0.0"'); if ($palette) { read_palette();