Skip to content

Commit b90730d

Browse files
committed
Fix Issue #1
1 parent a8efd1a commit b90730d

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

reporter/assets/js/sankey.js

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,9 @@
115115
}).on("mouseout", function(t) {
116116
mouseout(t, i);
117117
})
118+
.on("click", function(t) {
119+
click(t, i);
120+
})
118121
},
119122
exit: function() {
120123
this.remove()
@@ -497,6 +500,16 @@ function mouseout(d, svg) {
497500
d3.selectAll("[class=\"scene-image\"]").remove();
498501
}
499502

503+
function click(d, svg) {
504+
if(d.image) {
505+
var im = new Image();
506+
im.src = "data:image/png;base64," + d.image
507+
var w = window.open("",'_blank');
508+
w.document.write(im.outerHTML);
509+
w.document.close();
510+
}
511+
}
512+
500513
function label(node) {
501514
return node.name.replace(/\s*\(.*?\)$/, '');
502515
}

0 commit comments

Comments
 (0)