Browse Source

draggable is insode index.html now, no external svript

master
nglk 3 years ago
parent
commit
792d4b31ad
  1. 18
      index.html
  2. 1
      static/css/style.css
  3. 76
      static/js/d3_map.js
  4. 5
      static/js/draggable.js

18
index.html

@ -14,7 +14,6 @@
<script src="static/js/jquery-ui.min.js"></script>
<script src="static/js/bootstrap.min.js"></script>
<script src="static/js/d3.v3.min.js"></script>
<script src="static/js/draggable.js"></script>
</head>
<body>
@ -122,6 +121,21 @@ Through the map, we give shape to a common context in Turkish culture. The map a
</div>
</div>
<script type="text/javascript">
$(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++); }
});});
</script>
<!-- scripts for mouse events -->
<script>
@ -199,6 +213,8 @@ includeHTML();
}
$("#about").click(function(){
$("#showabout").fadeIn()
console.log("around")

1
static/css/style.css

@ -312,6 +312,7 @@ h2 {
}
.draggable {
position: absolute;
cursor: move;
/* cursor: all-scroll; */
}

76
static/js/d3_map.js

@ -80,7 +80,6 @@ d3.json("/static/js/group1.json", function(error, json) {
force.on("tick", function() {
link.attr("x1", function(d) {
return d.source.x;
@ -102,13 +101,6 @@ d3.json("/static/js/group1.json", function(error, json) {
});
// under construction
// d3.select("body").on("click",function(i){
// stop(i.id);
// });
// highlight NodeLists//Toggle stores whether the highlighting is on
var toggle = 0;
//Create an array logging what is connected to what
@ -146,77 +138,15 @@ d3.json("/static/js/group1.json", function(error, json) {
//end highlight nodes
// $(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";
// dada.scrollIntoView();
var dada = document.getElementById("text" + name);
dada.className += " active";
dada.scrollIntoView();
};
//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");
// };
//
// });
});
// function stop(name) {
// $(document).click(function (e) {
// if (!$(e.target).parents().andSelf().is('#'+ name)) {
// $("#show"+name).fadeOut();
// $("#audio"+name).trigger('pause');
// var textdada = document.getElementById("text"+name);
// textdada.classList.remove("active");
// };
// });
// };
//
//

5
static/js/draggable.js

@ -9,12 +9,7 @@ $(document).ready(function() {
var dragOpts = {
cursor: "move",
cursor: "grab",
// axis: "y",
distance: "0",
// cursorAt: {
// top: 0,
// left: 0
// }
};
$('.draggable').draggable(
{

Loading…
Cancel
Save