|
|
@ -34,10 +34,11 @@ var div = d3.select("body").append("div").style("opacity", 1); |
|
|
|
.attr("class", function(d){return "node group" + d.group}) |
|
|
|
.attr("id", function(d){return d.id}) |
|
|
|
.on("click", function(i){ |
|
|
|
popup(i.id,i.time); |
|
|
|
// popup video
|
|
|
|
div.transition().duration(100); |
|
|
|
div.html("<div id='show_video_bio'><span onclick='this.parentElement.style.display='none'' class='topleft'>×</span><iframe width='300' height='150' src='"+i.url+"' frameborder='0' allow='accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture' allowfullscreen></iframe><div id='bio"+i.id+"'>"+i.bio+"</div></div>") |
|
|
|
div.html("<div id='show_video_bio'><span onclick='this.parentElement.style.display='none'' class='topleft'>×</span><iframe width='300' height='150' src='"+i.url+"' frameborder='0' allow='accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture' allowfullscreen></iframe><div id='bio"+i.id+"'>"+i.bio+"</div></div>"); |
|
|
|
// rest pop up
|
|
|
|
popup(i.id,i.time); |
|
|
|
}) |
|
|
|
.on("dblclick",connectedNodes)// Added code
|
|
|
|
.call(force.drag); |
|
|
@ -163,9 +164,9 @@ function popup(name,time) { |
|
|
|
console.log("around") |
|
|
|
$("#thesis").fadeIn() |
|
|
|
$("#bio"+name).fadeIn() |
|
|
|
// var dada = document.getElementById("text"+name);
|
|
|
|
// dada.className += " active";
|
|
|
|
// dada.scrollIntoView();
|
|
|
|
var dada = document.getElementById("text"+name); |
|
|
|
dada.className += " active"; |
|
|
|
dada.scrollIntoView(); |
|
|
|
// var audio1 = document.getElementById("audioBG");
|
|
|
|
// audio1.currentTime = time;
|
|
|
|
// audio1.play();
|
|
|
|