Skip to content

Commit

Permalink
Make the flow tree node clickable and jump to the detail
Browse files Browse the repository at this point in the history
  • Loading branch information
shinglyu committed Oct 19, 2016
1 parent ce19b65 commit 2248fa8
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions etc/layout_viewer/viewer.html
Expand Up @@ -94,6 +94,7 @@
text: trace_node.class + " (" + trace_node.data.base.id + ")",
id: trace_node.data.base.id,
icon: "dummy",
href: "#diff-" + trace_node.data.base.id
};

var children = [];
Expand Down Expand Up @@ -192,13 +193,13 @@
if (delta !== undefined) {
var diff_id = "diff-" + key;
$("#flow-diffs").append(
"<div class='panel panel-default'><div class='panel-heading'>" +
flow_left.class + " (" + key + ")" +
"</div><div class='panel-body' id=" +
diff_id +
"></div></div>");
"<div class='panel panel-default' id='" +
diff_id +
"'><div class='panel-heading'>" +
flow_left.class + " (" + key + ")" +
"</div><div class='panel-body'></div></div>");

document.getElementById(diff_id).innerHTML =
document.getElementById(diff_id).getElementsByClassName('panel-body')[0].innerHTML =
jsondiffpatch.formatters.html.format(delta, flow_left);
node_color_hash[key] = "rgba(255, 0, 0, 0.7)";
} else {
Expand Down

0 comments on commit 2248fa8

Please sign in to comment.