From 2248fa8766e17e7b033f3b57ef5c6c468335f2b1 Mon Sep 17 00:00:00 2001 From: Shing Lyu Date: Wed, 19 Oct 2016 11:42:15 +0800 Subject: [PATCH] Make the flow tree node clickable and jump to the detail --- etc/layout_viewer/viewer.html | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/etc/layout_viewer/viewer.html b/etc/layout_viewer/viewer.html index a0baf66bf2b..09db3e0fc7f 100644 --- a/etc/layout_viewer/viewer.html +++ b/etc/layout_viewer/viewer.html @@ -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 = []; @@ -192,13 +193,13 @@ if (delta !== undefined) { var diff_id = "diff-" + key; $("#flow-diffs").append( - "
" + - flow_left.class + " (" + key + ")" + - "
"); + "
" + + flow_left.class + " (" + key + ")" + + "
"); - 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 {