@ -49,16 +49,17 @@ d3.json("/static/js/group1.json", function(error, json) {
. attr ( "width" , 16 )
. attr ( "width" , 16 )
. attr ( "height" , 16 ) ;
. attr ( "height" , 16 ) ;
node . on ( {
"mouseover" : function ( d ) {
d3 . select ( this ) . style ( "cursor" , "pointer" ) ;
} } ) ;
node . append ( "text" )
node . append ( "text" )
// .attr("xlink:href", "#")
. attr ( "dx" , 12 )
. attr ( "dx" , 12 )
. attr ( "dy" , ".35em" )
. attr ( "dy" , ".35em" )
. text ( function ( d ) { return d . name } ) ;
. text ( function ( d ) { return d . name } ) ;
node . on ( {
"mouseover" : function ( d ) {
d3 . select ( this ) . style ( "cursor" , "pointer" ) ;
} } ) ;
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 ; } )
@ -101,30 +102,47 @@ d3.json("/static/js/group1.json", function(error, json) {
//}
//}
// scripts for mouse events
// scripts for mouse events
$ ( "#dadaloglu" ) . click ( function ( ) {
$ ( "#showdadaloglu" ) . fadeIn ( )
function popup ( name , time ) {
$ ( "#" + name ) . click ( function ( ) {
$ ( "#show" + name ) . fadeIn ( )
console . log ( "around" )
console . log ( "around" )
var dada = document . getElementById ( "textdadaloglu" ) ;
var dada = document . getElementById ( "text" + name ) ;
dada . className += " active" ;
dada . className += " active" ;
dada . scrollIntoView ( ) ;
dada . scrollIntoView ( ) ;
var audio1 = document . getElementById ( "audio-1 " ) ;
var audio1 = document . getElementById ( "audioBG " ) ;
audio1 . currentTime = 12 ;
audio1 . currentTime = time ;
// audio1.play();
audio1 . play ( ) ;
} ) ;
} ) ;
} ;
popup ( 'dadaloglu' , 12 ) ;
popup ( 'asikA' , 45 ) ;
$ ( "#asikA" ) . click ( function ( ) { $ ( "#showasikA" ) . fadeIn ( )
console . log ( "around" )
// $("#dadaloglu").click(function(){
var muh = document . getElementById ( "textasikA" ) ;
// $("#showdadaloglu").fadeIn()
muh . className += " active" ;
// console.log("around")
muh . scrollIntoView ( ) ;
// var dada = document.getElementById("textdadaloglu");
var audio2 = document . getElementById ( "audio-1" ) ;
// dada.className += " active";
audio2 . currentTime = 50 ;
// dada.scrollIntoView();
// var audio1 = document.getElementById("audioBG");
// audio1.currentTime = 12;
// audio1.play();
// });
//
//
//
// $("#asikA").click(function(){$("#showasikA").fadeIn()
// console.log("around")
// var muh = document.getElementById("textasikA");
// muh.className += " active";
// muh.scrollIntoView();
// var audio2 = document.getElementById("audioBG");
// audio2.currentTime = 120;
// audio2.play();
// audio2.play();
} ) ;
// });
//pop-up
//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 ( ) ;
@ -134,10 +152,12 @@ d3.json("/static/js/group1.json", function(error, json) {
} ;
} ;
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 textmuh = document . getElementById ( "textasikA" ) ;
var textmuh = document . getElementById ( "textasikA" ) ;
textmuh . classList . remove ( "active" ) ;
textmuh . classList . remove ( "active" ) ;
} ;
} ;
} ) ;
} ) ;
} ) ;
} ) ;