|
@ -47,13 +47,16 @@ d3.json("/static/js/group1.json", function(error, json) { |
|
|
.attr("dy", ".35em") |
|
|
.attr("dy", ".35em") |
|
|
.text(function(d) { return d.name }); |
|
|
.text(function(d) { return d.name }); |
|
|
|
|
|
|
|
|
// let drag = d3.behavior.drag();
|
|
|
// // let drag = d3.behavior.drag();
|
|
|
// var drag = d3.behavior.drag()
|
|
|
// var drag = d3.behavior.drag()
|
|
|
// .on("drag", function() {
|
|
|
// .on("drag", function() {
|
|
|
// var x = d3.event.x;
|
|
|
// var x = d3.event.x;
|
|
|
// var y = d3.event.y;
|
|
|
// var y = d3.event.y;
|
|
|
// d3.select(this).attr("transform", "translate(" + x + "," + y + ")");
|
|
|
// d3.select(this).attr("transform", "translate(" + x + "," + y + ")");
|
|
|
// });
|
|
|
// });
|
|
|
|
|
|
//
|
|
|
|
|
|
//
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var divVideo = d3.select("body").append("div").style("opacity", 1); |
|
|
var divVideo = d3.select("body").append("div").style("opacity", 1); |
|
|
var divBio = 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"); |
|
|
d3.select(this).style("cursor", "pointer"); |
|
|
}}) |
|
|
}}) |
|
|
.on("click", function(i){ |
|
|
.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
|
|
|
// popup video
|
|
|
divVideo.transition().duration(100); |
|
|
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.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>"); |
|
|
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);
|
|
|
// div.on(".drag", null);
|
|
|
// span.html("<span onclick='this.parentElement.style.display='none'' class='topleft'>×</span>");
|
|
|
// span.html("<span onclick='this.parentElement.style.display='none'' class='topleft'>×</span>");
|
|
|
// rest pop up
|
|
|
// rest pop up
|
|
@ -78,6 +96,8 @@ var divBio = d3.select("body").append("div").style("opacity", 1); |
|
|
.on("dblclick",connectedNodes); |
|
|
.on("dblclick",connectedNodes); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
force.on("tick", function() { |
|
|
force.on("tick", function() { |
|
|
link.attr("x1", function(d) { return d.source.x; }) |
|
|
link.attr("x1", function(d) { return d.source.x; }) |
|
|
.attr("y1", function(d) { return d.source.y; }) |
|
|
.attr("y1", function(d) { return d.source.y; }) |
|
@ -167,23 +187,49 @@ function connectedNodes() { |
|
|
|
|
|
|
|
|
// scripts for mouse events
|
|
|
// scripts for mouse events
|
|
|
// var stopVideo = function (name) {
|
|
|
// var stopVideo = function (name) {
|
|
|
function stopVideo(name) { |
|
|
// function stopVideo(name) {
|
|
|
var iframe = document.querySelector( 'iframe'); |
|
|
// var iframe = document.querySelector( 'iframe');
|
|
|
var video = document.getElementById( "#video"+name ); |
|
|
// var video = document.getElementById( "#video"+name );
|
|
|
if ( iframe !== null ) { |
|
|
// if ( iframe !== null ) {
|
|
|
var iframeSrc = iframe.src; |
|
|
// var iframeSrc = iframe.src;
|
|
|
iframe.src = iframeSrc; |
|
|
// iframe.src = iframeSrc;
|
|
|
} |
|
|
// }
|
|
|
if ( video !== null ) { |
|
|
// if ( video !== null ) {
|
|
|
video.pause(); |
|
|
// 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) { |
|
|
function popup(name,time) { |
|
|
$("#show"+name).fadeIn() |
|
|
$("#show"+name).fadeIn() |
|
|
console.log("around") |
|
|
console.log("around") |
|
|
$("#thesis").fadeIn() |
|
|
$("#thesis").fadeIn() |
|
|
|
|
|
$("#thesisX").fadeIn() |
|
|
$("#bio"+name).fadeIn() |
|
|
$("#bio"+name).fadeIn() |
|
|
var dada = document.getElementById("text"+name); |
|
|
var dada = document.getElementById("text"+name); |
|
|
dada.className += " active"; |
|
|
dada.className += " active"; |
|
@ -196,22 +242,22 @@ function popup(name,time) { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//stop events when clicking somewhere else
|
|
|
//stop events when clicking somewhere else
|
|
|
$(document).click(function (e) { |
|
|
// $(document).click(function (e) {
|
|
|
if (!$(e.target).parents().andSelf().is('#dadaloglu')) { |
|
|
// if (!$(e.target).parents().andSelf().is('#dadaloglu')) {
|
|
|
$("#showdadaloglu").fadeOut(); |
|
|
// $("#showdadaloglu").fadeOut();
|
|
|
$("#audiodadaloglu").trigger('pause'); |
|
|
// $("#audiodadaloglu").trigger('pause');
|
|
|
// var textdada = document.getElementById("textdadaloglu");
|
|
|
// // var textdada = document.getElementById("textdadaloglu");
|
|
|
// textdada.classList.remove("active");
|
|
|
// // textdada.classList.remove("active");
|
|
|
}; |
|
|
// };
|
|
|
if (!$(e.target).parents().andSelf().is('#asikA')) { |
|
|
// if (!$(e.target).parents().andSelf().is('#asikA')) {
|
|
|
$("#showasikA").fadeOut(); |
|
|
// $("#showasikA").fadeOut();
|
|
|
$("#audioasikA").trigger('pause'); |
|
|
// $("#audioasikA").trigger('pause');
|
|
|
// var textasikA = document.getElementById("textasikA");
|
|
|
// // var textasikA = document.getElementById("textasikA");
|
|
|
// textasikA.classList.remove("active");
|
|
|
// // textasikA.classList.remove("active");
|
|
|
stopVideo("#asikA"); |
|
|
// stopVideo("#asikA");
|
|
|
}; |
|
|
// };
|
|
|
|
|
|
//
|
|
|
}); |
|
|
// });
|
|
|
|
|
|
|
|
|
// $(document).click(function (e) {
|
|
|
// $(document).click(function (e) {
|
|
|
// if (!$(e.target).parents().andSelf().is('#dadaloglu')) {
|
|
|
// if (!$(e.target).parents().andSelf().is('#dadaloglu')) {
|
|
|