fixed error with non dragged nodes
This commit is contained in:
parent
107412ed5d
commit
d425b542d9
@ -32,8 +32,9 @@ body {
|
||||
right: 0px;
|
||||
bottom: 0px;
|
||||
left: 0px;
|
||||
opacity: 0.6;
|
||||
opacity: 0.4;
|
||||
filter: blur(20px);
|
||||
opacity:
|
||||
}
|
||||
/*Main areas*/
|
||||
.map_area {
|
||||
|
28
wells/static/js/d3_map.js
vendored
28
wells/static/js/d3_map.js
vendored
@ -47,16 +47,6 @@ d3.json("/static/js/group1.json", function(error, json) {
|
||||
.attr("dy", ".35em")
|
||||
.text(function(d) { return d.name });
|
||||
|
||||
// // 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);
|
||||
@ -68,21 +58,9 @@ 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' 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>");
|
||||
divVideo.html("<div id='showvideo'><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
|
||||
@ -93,7 +71,8 @@ var divBio = d3.select("body").append("div").style("opacity", 1);
|
||||
// rest pop up
|
||||
popup(i.id,i.time);
|
||||
})
|
||||
.on("dblclick",connectedNodes);
|
||||
.on("dblclick",connectedNodes)
|
||||
.call(force.drag);
|
||||
|
||||
|
||||
|
||||
@ -106,7 +85,6 @@ var divBio = d3.select("body").append("div").style("opacity", 1);
|
||||
|
||||
node.attr("transform", function(d) { return "translate(" + d.x + "," + d.y + ")"; });
|
||||
|
||||
|
||||
});
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user