|
|
@ -47,13 +47,16 @@ d3.json("/static/js/group1.json", function(error, json) { |
|
|
|
.attr("dy", ".35em") |
|
|
|
.text(function(d) { return d.name }); |
|
|
|
|
|
|
|
// let drag = d3.behavior.drag();
|
|
|
|
// // let drag = d3.behavior.drag();
|
|
|
|
// var drag = d3.behavior.drag()
|
|
|
|
// .on("drag", function() {
|
|
|
|
// var x = d3.event.x;
|
|
|
|
// var y = d3.event.y;
|
|
|
|
// d3.select(this).attr("transform", "translate(" + x + "," + y + ")");
|
|
|
|
// });
|
|
|
|
//
|
|
|
|
//
|
|
|
|
|
|
|
|
|
|
|
|
var divVideo = d3.select("body").append("div").style("opacity", 1); |
|
|
|
var divBio = d3.select("body").append("div").style("opacity", 1); |
|
|
@ -65,11 +68,26 @@ var divBio = d3.select("body").append("div").style("opacity", 1); |
|
|
|
d3.select(this).style("cursor", "pointer"); |
|
|
|
}}) |
|
|
|
.on("click", function(i){ |
|
|
|
// $(document).ready(function() {
|
|
|
|
// var a = 3;
|
|
|
|
// var dragOpts = {
|
|
|
|
// cursor: "move",
|
|
|
|
// cursor: "grab",
|
|
|
|
// distance: "0",
|
|
|
|
// };
|
|
|
|
// $('.draggable').draggable(
|
|
|
|
// {
|
|
|
|
// start: function(event, ui) { $(this).css("z-index", a++); }
|
|
|
|
// });
|
|
|
|
// });
|
|
|
|
// popup video
|
|
|
|
divVideo.transition().duration(100); |
|
|
|
divVideo.html("<div id='showvideo'><span onclick=this.parentElement.style.display='none';stopVideo("+i.id+"); 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>"); |
|
|
|
divVideo.html("<div id='showvideo' class='draggable'><span onclick=this.parentElement.style.display='none';pauseAllVideos("+i.id+"); class='topleft'> × </span><iframe id='video"+i.id+"' width='300' height='150' src='"+i.url+"' frameborder='0' allow='accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture' allowfullscreen></iframe></div>"); |
|
|
|
divBio.transition().duration(100); |
|
|
|
divBio.html("<div id='showbio'><span onclick=this.parentElement.style.display='none' class='topleft'> × </span><div id='bio"+i.id+"'>"+i.bio+"</div>"); |
|
|
|
// draggable
|
|
|
|
|
|
|
|
|
|
|
|
// div.on(".drag", null);
|
|
|
|
// span.html("<span onclick='this.parentElement.style.display='none'' class='topleft'>×</span>");
|
|
|
|
// rest pop up
|
|
|
@ -78,6 +96,8 @@ var divBio = d3.select("body").append("div").style("opacity", 1); |
|
|
|
.on("dblclick",connectedNodes); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
force.on("tick", function() { |
|
|
|
link.attr("x1", function(d) { return d.source.x; }) |
|
|
|
.attr("y1", function(d) { return d.source.y; }) |
|
|
@ -167,23 +187,49 @@ function connectedNodes() { |
|
|
|
|
|
|
|
// scripts for mouse events
|
|
|
|
// var stopVideo = function (name) {
|
|
|
|
function stopVideo(name) { |
|
|
|
var iframe = document.querySelector( 'iframe'); |
|
|
|
var video = document.getElementById( "#video"+name ); |
|
|
|
if ( iframe !== null ) { |
|
|
|
var iframeSrc = iframe.src; |
|
|
|
iframe.src = iframeSrc; |
|
|
|
} |
|
|
|
if ( video !== null ) { |
|
|
|
video.pause(); |
|
|
|
} |
|
|
|
// function stopVideo(name) {
|
|
|
|
// var iframe = document.querySelector( 'iframe');
|
|
|
|
// var video = document.getElementById( "#video"+name );
|
|
|
|
// if ( iframe !== null ) {
|
|
|
|
// var iframeSrc = iframe.src;
|
|
|
|
// iframe.src = iframeSrc;
|
|
|
|
// }
|
|
|
|
// if ( video !== null ) {
|
|
|
|
// video.pause();
|
|
|
|
// }
|
|
|
|
// };
|
|
|
|
|
|
|
|
// $(function (){
|
|
|
|
// $('.topleft').click(function(){
|
|
|
|
// $('iframe').attr('src', $('iframe').attr('src'));
|
|
|
|
// });
|
|
|
|
// });
|
|
|
|
|
|
|
|
|
|
|
|
// function pauseAllVideos(name)
|
|
|
|
// {
|
|
|
|
// $("#video"+name).each(function(){
|
|
|
|
// this.contentWindow.postMessage('{"event":"command","func":"stopVideo","args":""}', '*')
|
|
|
|
// });
|
|
|
|
// }
|
|
|
|
|
|
|
|
function pauseAllVideos(name) { |
|
|
|
$("video"+name).each(function(){ |
|
|
|
$(this).stopVideo(); |
|
|
|
}); |
|
|
|
}; |
|
|
|
|
|
|
|
// $(function (){
|
|
|
|
// $('.topleft').click(function(){
|
|
|
|
// $('iframe').attr('src', $('iframe').attr('src'));
|
|
|
|
// });
|
|
|
|
// });
|
|
|
|
|
|
|
|
function popup(name,time) { |
|
|
|
$("#show"+name).fadeIn() |
|
|
|
console.log("around") |
|
|
|
$("#thesis").fadeIn() |
|
|
|
$("#thesisX").fadeIn() |
|
|
|
$("#bio"+name).fadeIn() |
|
|
|
var dada = document.getElementById("text"+name); |
|
|
|
dada.className += " active"; |
|
|
@ -196,22 +242,22 @@ function popup(name,time) { |
|
|
|
|
|
|
|
|
|
|
|
//stop events when clicking somewhere else
|
|
|
|
$(document).click(function (e) { |
|
|
|
if (!$(e.target).parents().andSelf().is('#dadaloglu')) { |
|
|
|
$("#showdadaloglu").fadeOut(); |
|
|
|
$("#audiodadaloglu").trigger('pause'); |
|
|
|
// var textdada = document.getElementById("textdadaloglu");
|
|
|
|
// textdada.classList.remove("active");
|
|
|
|
}; |
|
|
|
if (!$(e.target).parents().andSelf().is('#asikA')) { |
|
|
|
$("#showasikA").fadeOut(); |
|
|
|
$("#audioasikA").trigger('pause'); |
|
|
|
// var textasikA = document.getElementById("textasikA");
|
|
|
|
// textasikA.classList.remove("active");
|
|
|
|
stopVideo("#asikA"); |
|
|
|
}; |
|
|
|
|
|
|
|
}); |
|
|
|
// $(document).click(function (e) {
|
|
|
|
// if (!$(e.target).parents().andSelf().is('#dadaloglu')) {
|
|
|
|
// $("#showdadaloglu").fadeOut();
|
|
|
|
// $("#audiodadaloglu").trigger('pause');
|
|
|
|
// // var textdada = document.getElementById("textdadaloglu");
|
|
|
|
// // textdada.classList.remove("active");
|
|
|
|
// };
|
|
|
|
// if (!$(e.target).parents().andSelf().is('#asikA')) {
|
|
|
|
// $("#showasikA").fadeOut();
|
|
|
|
// $("#audioasikA").trigger('pause');
|
|
|
|
// // var textasikA = document.getElementById("textasikA");
|
|
|
|
// // textasikA.classList.remove("active");
|
|
|
|
// stopVideo("#asikA");
|
|
|
|
// };
|
|
|
|
//
|
|
|
|
// });
|
|
|
|
|
|
|
|
// $(document).click(function (e) {
|
|
|
|
// if (!$(e.target).parents().andSelf().is('#dadaloglu')) {
|
|
|
|