diff options
Diffstat (limited to 'src/main/resources/www/warmroast.js')
-rw-r--r-- | src/main/resources/www/warmroast.js | 43 |
1 files changed, 0 insertions, 43 deletions
diff --git a/src/main/resources/www/warmroast.js b/src/main/resources/www/warmroast.js deleted file mode 100644 index c7dd7bc..0000000 --- a/src/main/resources/www/warmroast.js +++ /dev/null @@ -1,43 +0,0 @@ -$(".name").on("click", function(event) { - var $parent = $(this).parent(); - if ($parent.hasClass("collapsed")) { - $parent.removeClass("collapsed"); - $parent.children("ul").slideDown(50); - } else { - $parent.addClass("collapsed"); - $parent.children("ul").slideUp(50); - } -}); - -function extractTime($el) { - var text = $el.children(".name") - .children(".time").text().replace(/[^0-9]/, ""); - return parseInt(text); -} - -var $overlay = $("#overlay"); - -$(".name").on("mouseenter", function(event) { - var $this = $(this); - var thisTime = null; - $overlay.empty(); - $this.parents(".node").each(function(i, parent) { - var $parent = $(parent); - var time = extractTime($parent); - if (thisTime == null) { - thisTime = time; - } else { - var $el = $(document.createElement("span")); - var pos = $parent.position(); - var width = $el.outerWidth(); - $el.text(((thisTime / time) * 100).toFixed(2) + "%"); - $el.css({ - top: pos.top + "px" - }); - $overlay.append($el); - } - }); -}); - -$(".loading").hide(); -$(".stack").show();
\ No newline at end of file |