draggable is insode index.html now, no external svript

This commit is contained in:
nglk 2021-01-15 17:31:32 +01:00
parent b39e37ea83
commit 792d4b31ad
4 changed files with 21 additions and 79 deletions

View File

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

View File

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

76
static/js/d3_map.js vendored
View File

@ -80,7 +80,6 @@ d3.json("/static/js/group1.json", function(error, json) {
force.on("tick", function() { force.on("tick", function() {
link.attr("x1", function(d) { link.attr("x1", function(d) {
return d.source.x; 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 // highlight NodeLists//Toggle stores whether the highlighting is on
var toggle = 0; var toggle = 0;
//Create an array logging what is connected to what //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 //end highlight nodes
// $(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() $("#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";
// dada.scrollIntoView(); 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");
// };
// });
// };
//
//

View File

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