do changes in task2 and task 3

parent f60abf0c
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
integrity="sha256-/xUj+3OJU5yExlq6GSYGSHk7tPXikynS7ogEvDej/m4=" crossorigin="anonymous"></script> integrity="sha256-/xUj+3OJU5yExlq6GSYGSHk7tPXikynS7ogEvDej/m4=" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/chart.js@3.7.1/dist/chart.min.js"></script> <script src="https://cdn.jsdelivr.net/npm/chart.js@3.7.1/dist/chart.min.js"></script>
<script src="https://code.jquery.com/jquery-3.6.0.js"></script> <script src="https://code.jquery.com/jquery-3.6.0.js"></script>
<script src="webgazer_calib.js" type="text/javascript"></script> <script src="webgazertask1.js" type="text/javascript"></script>
<style type="text/css"> <style type="text/css">
body { body {
background-color: #FFF2CC; background-color: #FFF2CC;
...@@ -38,34 +38,49 @@ ...@@ -38,34 +38,49 @@
left: 2%; left: 2%;
} }
img.sgif {
/* width: 1368px;
height: 766; */
width: 100%;
height: 100%;
object-fit: fill;
}
img.simg {
/* width: 1368px;
height: 766; */
width: 100%;
height: 100%;
object-fit: fill;
}
</style> </style>
</head> </head>
<body style="margin: 0px; "> <body style="margin: 0px; ">
<img id="ch" class="slide" style="display: none;" src="images/task1/CHR.png"> <img id="ch" class="slide simg" style="display: none;" src="images/task1/CHR.png">
<img id="s1" class="slide" style="display: none;" src="images/task1/F1.png"> <img id="s1" class="slide simg" style="display: none;" src="images/task1/F1.png">
<img id="s2" class="slide" style="display: none;" src="images/task1/F2.png"> <img id="s2" class="slide simg" style="display: none;" src="images/task1/F2.png">
<img id="s3" class="slide" style="display: none;" src="images/task1/gif1.gif"> <img id="s3" class="slide sgif" style="display: none;" src="images/task1/gif1.gif">
<img id="s4" class="slide" style="display: none;" src="images/task1/F3.png"> <img id="s4" class="slide simg" style="display: none;" src="images/task1/F3.png">
<img id="s5" class="slide" style="display: none;" src="images/task1/gif2.gif"> <img id="s5" class="slide sgif" style="display: none;" src="images/task1/gif2.gif">
<img id="s6" class="slide" style="display: none;" src="images/task1/F4R.png"> <img id="s6" class="slide simg" style="display: none;" src="images/task1/F4R.png">
<img id="s7" class="slide" style="display: none;" src="images/task1/F5R.png"> <img id="s7" class="slide simg" style="display: none;" src="images/task1/F5R.png">
<img id="s8" class="slide" style="display: none;" src="images/task1/F6R.png"> <img id="s8" class="slide simg" style="display: none;" src="images/task1/F6R.png">
<img id="s9" class="slide" style="display: none;" src="images/task1/F7R.png"> <img id="s9" class="slide simg" style="display: none;" src="images/task1/F7R.png">
<img id="s10" class="slide" style="display: none;" src="images/task1/F8R.png"> <img id="s10" class="slide simg" style="display: none;" src="images/task1/F8R.png">
<img id="s11" class="slide" style="display: none;" src="images/task1/F9R.png"> <img id="s11" class="slide simg" style="display: none;" src="images/task1/F9R.png">
<img id="s12" class="slide" style="display: none;" src="images/task1/F10R.png"> <img id="s12" class="slide simg" style="display: none;" src="images/task1/F10R.png">
<img id="s13" class="slide" style="display: none;" src="images/task1/F11R.png"> <img id="s13" class="slide simg" style="display: none;" src="images/task1/F11R.png">
<img id="s14" class="slide" style="display: none;" src="images/task1/F12R.png"> <img id="s14" class="slide simg" style="display: none;" src="images/task1/F12R.png">
<img id="s15" class="slide" style="display: none;" src="images/task1/F13R.png"> <img id="s15" class="slide simg" style="display: none;" src="images/task1/F13R.png">
<img id="s16" class="slide" style="display: none;" src="images/task1/F14R.png"> <img id="s16" class="slide simg" style="display: none;" src="images/task1/F14R.png">
<img id="s17" class="slide" style="display: none;" src="images/task1/F15R.png"> <img id="s17" class="slide simg" style="display: none;" src="images/task1/F15R.png">
<img id="s18" class="slide" style="display: none;" src="images/task1/F16R.png"> <img id="s18" class="slide simg" style="display: none;" src="images/task1/F16R.png">
<img id="s19" class="slide" style="display: none;" src="images/task1/F17R.png"> <img id="s19" class="slide simg" style="display: none;" src="images/task1/F17R.png">
<img id="result" class="slide" style="display: none;" src="images/task1/result1.png"> <img id="result" class="slide " style="display: none;" src="images/task1/result1.png">
<img id="details" class="details" style="display: none;" src="images/task1/detail.png"> <img id="details" class="details " style="display: none;" src="images/task1/detail.png">
<div id="resultChart" <div id="resultChart"
...@@ -97,6 +112,7 @@ ...@@ -97,6 +112,7 @@
<option value="17">Slide 17</option> <option value="17">Slide 17</option>
<option value="18">Slide 18</option> <option value="18">Slide 18</option>
<option value="19">Slide 19</option> <option value="19">Slide 19</option>
<option value="all">All Slide</option>
</select> </select>
</div> </div>
...@@ -840,11 +856,11 @@ ...@@ -840,11 +856,11 @@
}, },
}; };
// $(document).ready(function (){
// document.documentElement.requestFullscreen();
// })
// <!-- start webgazer --> // <!-- start webgazer -->
var startTime = 0;
var pausedTime = 0;
var resumeTime = 0;
var arr = {}; var arr = {};
var percentArr = {} var percentArr = {}
var percentArr2 = {} var percentArr2 = {}
...@@ -857,6 +873,15 @@ ...@@ -857,6 +873,15 @@
var taskLoop; var taskLoop;
var taskPaused = false; var taskPaused = false;
var x_center = window.innerWidth / 2;
var y_center = window.innerHeight / 2;
console.log("3333333333333333333333333333333333333333333");
console.log(x_center);
console.log(y_center);
console.log("3333333333333333333333333333333333333333333");
webgazer.setGazeListener(function (data, elapsedTime) { webgazer.setGazeListener(function (data, elapsedTime) {
if (data == null) { if (data == null) {
return; return;
...@@ -864,8 +889,18 @@ ...@@ -864,8 +889,18 @@
if (!started) { if (!started) {
showSlide(); showSlide();
taskLoop = setInterval(showSlide, 7000); taskLoop = setInterval(showSlide, 10000);
started = true; started = true;
//time stamp converter
if (startTime == 0) {
startTime = Date.now()
console.log("startTime1");
console.log(startTime);
console.log("startTime1");
}else{
}
} }
var xprediction = data.x; //these x coordinates are relative to the viewport var xprediction = data.x; //these x coordinates are relative to the viewport
...@@ -883,17 +918,22 @@ ...@@ -883,17 +918,22 @@
} }
arr[slide].push({ arr[slide].push({
"timestamp": Date.now(), "timestamp": (Date.now() - startTime)/1000,
//"timestamp": Date.now(),
"x": xprediction, "x": xprediction,
"y": yprediction, "y": yprediction,
"bb": gazeObject.name, "bb": gazeObject.name,
"type": gazeObject.type "type": gazeObject.type
}) })
$("#objectName").text(gazeObject.name, xprediction, yprediction) //$("#objectName").text(gazeObject.name, xprediction, yprediction)
} }
}).begin(); }).begin();
function scaleCoordinates(val){
factor = window.innerWidth / 1366;
return val * factor;
}
function printPred() { function printPred() {
var prediction = webgazer.getCurrentPrediction(); var prediction = webgazer.getCurrentPrediction();
...@@ -908,22 +948,42 @@ ...@@ -908,22 +948,42 @@
if (slide == "s1") { if (slide == "s1") {
object1 = boundaryArr[slide]["F1I1"] object1 = boundaryArr[slide]["F1I1"]
if (((object1.left < xcoordinate) && (xcoordinate < object1.right)) && ((object1.top < ycoordinate) && (ycoordinate < object1.bottom))) { if (((scaleCoordinates(object1.left) < xcoordinate) && (xcoordinate < scaleCoordinates(object1.right))) && ((scaleCoordinates(object1.top) < ycoordinate) && (ycoordinate < scaleCoordinates(object1.bottom)))) {
return { return {
"name": object1.name, "name": object1.name,
"type": object1.type, "type": object1.type,
} }
} }
if ((xcoordinate < x_center) && (ycoordinate < y_center)) {
return {
"name": "topleft",
"type": "none"
}
}
if ((xcoordinate > x_center) && (ycoordinate < y_center)) {
return {
"name": "topright",
"type": "none"
}
}
if ((xcoordinate < x_center) && (ycoordinate > y_center)) {
return { return {
"name": "none", "name": "bottomleft",
"type": "none" "type": "none"
} }
} }
if ((xcoordinate > x_center) && (ycoordinate > y_center)) {
return {
"name": "bottomright",
"type": "none"
}
}
}
//slide2 //slide2
if (slide == "s2") { if (slide == "s2") {
object2 = boundaryArr[slide]["F2I1"] object2 = boundaryArr[slide]["F2I1"]
if (((object2.left < xcoordinate) && (xcoordinate < object2.right)) && ((object2.top < ycoordinate) && (ycoordinate < object2.bottom))) { if (((scaleCoordinates(object2.left) < xcoordinate) && (xcoordinate < scaleCoordinates(object2.right))) && ((scaleCoordinates(object2.top) < ycoordinate) && (ycoordinate < scaleCoordinates(object2.bottom)))) {
return { return {
"name": object2.name, "name": object2.name,
"type": object2.type, "type": object2.type,
...@@ -931,7 +991,7 @@ ...@@ -931,7 +991,7 @@
} }
object3 = boundaryArr[slide]["F2I2"] object3 = boundaryArr[slide]["F2I2"]
if (((object3.left < xcoordinate) && (xcoordinate < object3.right)) && ((object3.top < ycoordinate) && (ycoordinate < object3.bottom))) { if (((scaleCoordinates(object3.left) < xcoordinate) && (xcoordinate < scaleCoordinates(object3.right))) && ((scaleCoordinates(object3.top) < ycoordinate) && (ycoordinate < scaleCoordinates(object3.bottom)))) {
return { return {
"name": object3.name, "name": object3.name,
"type": object3.type, "type": object3.type,
...@@ -939,58 +999,98 @@ ...@@ -939,58 +999,98 @@
} }
object4 = boundaryArr[slide]["F2I3"] object4 = boundaryArr[slide]["F2I3"]
if (((object4.left < xcoordinate) && (xcoordinate < object4.right)) && ((object4.top < ycoordinate) && (ycoordinate < object4.bottom))) { if (((scaleCoordinates(object4.left) < xcoordinate) && (xcoordinate < scaleCoordinates(object4.right))) && ((scaleCoordinates(object4.top) < ycoordinate) && (ycoordinate < scaleCoordinates(object4.bottom)))) {
return { return {
"name": object4.name, "name": object4.name,
"type": object4.type, "type": object4.type,
} }
} }
if ((xcoordinate < x_center) && (ycoordinate < y_center)) {
return {
"name": "topleft",
"type": "none"
}
}
if ((xcoordinate > x_center) && (ycoordinate < y_center)) {
return { return {
"name": "none", "name": "topright",
"type": "none" "type": "none"
} }
} }
if ((xcoordinate < x_center) && (ycoordinate > y_center)) {
return {
"name": "bottomleft",
"type": "none"
}
}
if ((xcoordinate > x_center) && (ycoordinate > y_center)) {
return {
"name": "bottomright",
"type": "none"
}
}
}
//slide3 //slide3
if (slide == "s3") { if (slide == "s3") {
object5 = boundaryArr[slide]["F3I1"] object5 = boundaryArr[slide]["F3I1"]
if (((object5.left < xcoordinate) && (xcoordinate < object5.right)) && ((object5.top < ycoordinate) && (ycoordinate < object5.bottom))) { if (((scaleCoordinates(object5.left) < xcoordinate) && (xcoordinate < scaleCoordinates(object5.right))) && ((scaleCoordinates(object5.top) < ycoordinate) && (ycoordinate < scaleCoordinates(object5.bottom)))) {
return { return {
"name": object5.name, "name": object5.name,
"type": object5.type, "type": object5.type,
} }
} }
object6 = boundaryArr[slide]["F3I2"] object6 = boundaryArr[slide]["F3I2"]
if (((object6.left < xcoordinate) && (xcoordinate < object6.right)) && ((object6.top < ycoordinate) && (ycoordinate < object6.bottom))) { if (((scaleCoordinates(object6.left) < xcoordinate) && (xcoordinate < scaleCoordinates(object6.right))) && ((scaleCoordinates(object6.top) < ycoordinate) && (ycoordinate < scaleCoordinates(object6.bottom)))) {
return { return {
"name": object6.name, "name": object6.name,
"type": object6.type, "type": object6.type,
} }
} }
object7 = boundaryArr[slide]["F3I3"] object7 = boundaryArr[slide]["F3I3"]
if (((object7.left < xcoordinate) && (xcoordinate < object7.right)) && ((object7.top < ycoordinate) && (ycoordinate < object7.bottom))) { if (((scaleCoordinates(object7.left) < xcoordinate) && (xcoordinate < scaleCoordinates(object7.right))) && ((scaleCoordinates(object7.top) < ycoordinate) && (ycoordinate < scaleCoordinates(object7.bottom)))) {
return { return {
"name": object7.name, "name": object7.name,
"type": object7.type, "type": object7.type,
} }
} }
if ((xcoordinate < x_center) && (ycoordinate < y_center)) {
return { return {
"name": "none", "name": "topleft",
"type": "none" "type": "none"
} }
} }
if ((xcoordinate > x_center) && (ycoordinate < y_center)) {
return {
"name": "topright",
"type": "none"
}
}
if ((xcoordinate < x_center) && (ycoordinate > y_center)) {
return {
"name": "bottomleft",
"type": "none"
}
}
if ((xcoordinate > x_center) && (ycoordinate > y_center)) {
return {
"name": "bottomright",
"type": "none"
}
}
}
//slide4 //slide4
if (slide == "s4") { if (slide == "s4") {
object9 = boundaryArr[slide]["F4I2"] object9 = boundaryArr[slide]["F4I2"]
if (((object9.left < xcoordinate) && (xcoordinate < object9.right)) && ((object9.top < ycoordinate) && (ycoordinate < object9.bottom))) { if (((scaleCoordinates(object9.left) < xcoordinate) && (xcoordinate < scaleCoordinates(object9.right))) && ((scaleCoordinates(object9.top) < ycoordinate) && (ycoordinate < scaleCoordinates(object9.bottom)))) {
return { return {
"name": object9.name, "name": object9.name,
"type": object9.type, "type": object9.type,
} }
} }
object10 = boundaryArr[slide]["F4I3"] object10 = boundaryArr[slide]["F4I3"]
if (((object10.left < xcoordinate) && (xcoordinate < object10.right)) && ((object10.top < ycoordinate) && (ycoordinate < object10.bottom))) { if (((scaleCoordinates(object10.left) < xcoordinate) && (xcoordinate < scaleCoordinates(object10.right))) && ((scaleCoordinates(object10.top) < ycoordinate) && (ycoordinate < scaleCoordinates(object10.bottom)))) {
return { return {
"name": object10.name, "name": object10.name,
"type": object10.type, "type": object10.type,
...@@ -998,29 +1098,49 @@ ...@@ -998,29 +1098,49 @@
} }
object8 = boundaryArr[slide]["F4I1"] object8 = boundaryArr[slide]["F4I1"]
if (((object8.left < xcoordinate) && (xcoordinate < object8.right)) && ((object8.top < ycoordinate) && (ycoordinate < object8.bottom))) { if (((scaleCoordinates(object8.left) < xcoordinate) && (xcoordinate < scaleCoordinates(object8.right))) && ((scaleCoordinates(object8.top) < ycoordinate) && (ycoordinate < scaleCoordinates(object8.bottom)))) {
return { return {
"name": object8.name, "name": object8.name,
"type": object8.type, "type": object8.type,
} }
} }
if ((xcoordinate < x_center) && (ycoordinate < y_center)) {
return {
"name": "topleft",
"type": "none"
}
}
if ((xcoordinate > x_center) && (ycoordinate < y_center)) {
return {
"name": "topright",
"type": "none"
}
}
if ((xcoordinate < x_center) && (ycoordinate > y_center)) {
return { return {
"name": "none", "name": "bottomleft",
"type": "none" "type": "none"
} }
} }
if ((xcoordinate > x_center) && (ycoordinate > y_center)) {
return {
"name": "bottomright",
"type": "none"
}
}
}
//slide5 //slide5
if (slide == "s5") { if (slide == "s5") {
object12 = boundaryArr[slide]["F5I2"] object12 = boundaryArr[slide]["F5I2"]
if (((object12.left < xcoordinate) && (xcoordinate < object12.right)) && ((object12.top < ycoordinate) && (ycoordinate < object12.bottom))) { if (((scaleCoordinates(object12.left) < xcoordinate) && (xcoordinate < scaleCoordinates(object12.right))) && ((scaleCoordinates(object12.top) < ycoordinate) && (ycoordinate < scaleCoordinates(object12.bottom)))) {
return { return {
"name": object12.name, "name": object12.name,
"type": object12.type, "type": object12.type,
} }
} }
object13 = boundaryArr[slide]["F5I3"] object13 = boundaryArr[slide]["F5I3"]
if (((object13.left < xcoordinate) && (xcoordinate < object13.right)) && ((object13.top < ycoordinate) && (ycoordinate < object13.bottom))) { if (((scaleCoordinates(object13.left) < xcoordinate) && (xcoordinate < scaleCoordinates(object13.right))) && ((scaleCoordinates(object13.top) < ycoordinate) && (ycoordinate < scaleCoordinates(object13.bottom)))) {
return { return {
"name": object13.name, "name": object13.name,
"type": object13.type, "type": object13.type,
...@@ -1028,82 +1148,142 @@ ...@@ -1028,82 +1148,142 @@
} }
object11 = boundaryArr[slide]["F5I1"] object11 = boundaryArr[slide]["F5I1"]
if (((object11.left < xcoordinate) && (xcoordinate < object11.right)) && ((object11.top < ycoordinate) && (ycoordinate < object11.bottom))) { if (((scaleCoordinates(object11.left) < xcoordinate) && (xcoordinate < scaleCoordinates(object11.right))) && ((scaleCoordinates(object11.top) < ycoordinate) && (ycoordinate < scaleCoordinates(object11.bottom)))) {
return { return {
"name": object11.name, "name": object11.name,
"type": object11.type, "type": object11.type,
} }
} }
if ((xcoordinate < x_center) && (ycoordinate < y_center)) {
return {
"name": "topleft",
"type": "none"
}
}
if ((xcoordinate > x_center) && (ycoordinate < y_center)) {
return {
"name": "topright",
"type": "none"
}
}
if ((xcoordinate < x_center) && (ycoordinate > y_center)) {
return {
"name": "bottomleft",
"type": "none"
}
}
if ((xcoordinate > x_center) && (ycoordinate > y_center)) {
return { return {
"name": "none", "name": "bottomright",
"type": "none" "type": "none"
} }
} }
}
//slide6 //slide6
if (slide == "s6") { if (slide == "s6") {
object14 = boundaryArr[slide]["F6I1"] object14 = boundaryArr[slide]["F6I1"]
if (((object14.left < xcoordinate) && (xcoordinate < object14.right)) && ((object14.top < ycoordinate) && (ycoordinate < object14.bottom))) { if (((scaleCoordinates(object14.left) < xcoordinate) && (xcoordinate < scaleCoordinates(object14.right))) && ((scaleCoordinates(object14.top) < ycoordinate) && (ycoordinate < scaleCoordinates(object14.bottom)))) {
return { return {
"name": object14.name, "name": object14.name,
"type": object14.type, "type": object14.type,
} }
} }
object15 = boundaryArr[slide]["F6I2"] object15 = boundaryArr[slide]["F6I2"]
if (((object15.left < xcoordinate) && (xcoordinate < object15.right)) && ((object15.top < ycoordinate) && (ycoordinate < object15.bottom))) { if (((scaleCoordinates(object15.left) < xcoordinate) && (xcoordinate < scaleCoordinates(object15.right))) && ((scaleCoordinates(object15.top) < ycoordinate) && (ycoordinate < scaleCoordinates(object15.bottom)))) {
return { return {
"name": object15.name, "name": object15.name,
"type": object15.type, "type": object15.type,
} }
} }
object16 = boundaryArr[slide]["F6I3"] object16 = boundaryArr[slide]["F6I3"]
if (((object16.left < xcoordinate) && (xcoordinate < object16.right)) && ((object16.top < ycoordinate) && (ycoordinate < object16.bottom))) { if (((scaleCoordinates(object16.left) < xcoordinate) && (xcoordinate < scaleCoordinates(object16.right))) && ((scaleCoordinates(object16.top) < ycoordinate) && (ycoordinate < scaleCoordinates(object16.bottom)))) {
return { return {
"name": object16.name, "name": object16.name,
"type": object16.type, "type": object16.type,
} }
} }
if ((xcoordinate < x_center) && (ycoordinate < y_center)) {
return {
"name": "topleft",
"type": "none"
}
}
if ((xcoordinate > x_center) && (ycoordinate < y_center)) {
return {
"name": "topright",
"type": "none"
}
}
if ((xcoordinate < x_center) && (ycoordinate > y_center)) {
return { return {
"name": "none", "name": "bottomleft",
"type": "none" "type": "none"
} }
} }
if ((xcoordinate > x_center) && (ycoordinate > y_center)) {
return {
"name": "bottomright",
"type": "none"
}
}
}
//slide7 //slide7
if (slide == "s7") { if (slide == "s7") {
object17 = boundaryArr[slide]["F7I1"] object17 = boundaryArr[slide]["F7I1"]
if (((object17.left < xcoordinate) && (xcoordinate < object17.right)) && ((object17.top < ycoordinate) && (ycoordinate < object17.bottom))) { if (((scaleCoordinates(object17.left) < xcoordinate) && (xcoordinate < scaleCoordinates(object17.right))) && ((scaleCoordinates(object17.top) < ycoordinate) && (ycoordinate < scaleCoordinates(object17.bottom)))) {
return { return {
"name": object17.name, "name": object17.name,
"type": object17.type, "type": object17.type,
} }
} }
object18 = boundaryArr[slide]["F7I2"] object18 = boundaryArr[slide]["F7I2"]
if (((object18.left < xcoordinate) && (xcoordinate < object18.right)) && ((object18.top < ycoordinate) && (ycoordinate < object18.bottom))) { if (((scaleCoordinates(object18.left) < xcoordinate) && (xcoordinate < scaleCoordinates(object18.right))) && ((scaleCoordinates(object18.top) < ycoordinate) && (ycoordinate < scaleCoordinates(object18.bottom)))) {
return { return {
"name": object18.name, "name": object18.name,
"type": object18.type, "type": object18.type,
} }
} }
object19 = boundaryArr[slide]["F7I3"] object19 = boundaryArr[slide]["F7I3"]
if (((object19.left < xcoordinate) && (xcoordinate < object19.right)) && ((object19.top < ycoordinate) && (ycoordinate < object19.bottom))) { if (((scaleCoordinates(object19.left) < xcoordinate) && (xcoordinate < scaleCoordinates(object19.right))) && ((scaleCoordinates(object19.top) < ycoordinate) && (ycoordinate < scaleCoordinates(object19.bottom)))) {
return { return {
"name": object19.name, "name": object19.name,
"type": object19.type, "type": object19.type,
} }
} }
if ((xcoordinate < x_center) && (ycoordinate < y_center)) {
return {
"name": "topleft",
"type": "none"
}
}
if ((xcoordinate > x_center) && (ycoordinate < y_center)) {
return {
"name": "topright",
"type": "none"
}
}
if ((xcoordinate < x_center) && (ycoordinate > y_center)) {
return {
"name": "bottomleft",
"type": "none"
}
}
if ((xcoordinate > x_center) && (ycoordinate > y_center)) {
return { return {
"name": "none", "name": "bottomright",
"type": "none" "type": "none"
} }
} }
}
//slide8 //slide8
if (slide == "s8") { if (slide == "s8") {
object20 = boundaryArr[slide]["F8I1"] object20 = boundaryArr[slide]["F8I1"]
if (((object20.left < xcoordinate) && (xcoordinate < object20.right)) && ((object20.top < ycoordinate) && (ycoordinate < object20.bottom))) { if (((scaleCoordinates(object20.left) < xcoordinate) && (xcoordinate < scaleCoordinates(object20.right))) && ((scaleCoordinates(object20.top) < ycoordinate) && (ycoordinate < scaleCoordinates(object20.bottom)))) {
return { return {
"name": object20.name, "name": object20.name,
"type": object20.type, "type": object20.type,
...@@ -1111,38 +1291,58 @@ ...@@ -1111,38 +1291,58 @@
} }
object21 = boundaryArr[slide]["F8I2"] object21 = boundaryArr[slide]["F8I2"]
if (((object21.left < xcoordinate) && (xcoordinate < object21.right)) && ((object21.top < ycoordinate) && (ycoordinate < object21.bottom))) { if (((scaleCoordinates(object21.left) < xcoordinate) && (xcoordinate < scaleCoordinates(object21.right))) && ((scaleCoordinates(object21.top) < ycoordinate) && (ycoordinate < scaleCoordinates(object21.bottom)))) {
return { return {
"name": object21.name, "name": object21.name,
"type": object21.type, "type": object21.type,
} }
} }
object22 = boundaryArr[slide]["F8I3"] object22 = boundaryArr[slide]["F8I3"]
if (((object22.left < xcoordinate) && (xcoordinate < object22.right)) && ((object22.top < ycoordinate) && (ycoordinate < object22.bottom))) { if (((scaleCoordinates(object22.left) < xcoordinate) && (xcoordinate < scaleCoordinates(object22.right))) && ((scaleCoordinates(object22.top) < ycoordinate) && (ycoordinate < scaleCoordinates(object22.bottom)))) {
return { return {
"name": object22.name, "name": object22.name,
"type": object22.type, "type": object22.type,
} }
} }
object23 = boundaryArr[slide]["F8I4"] object23 = boundaryArr[slide]["F8I4"]
if (((object23.left < xcoordinate) && (xcoordinate < object23.right)) && ((object23.top < ycoordinate) && (ycoordinate < object23.bottom))) { if (((scaleCoordinates(object23.left) < xcoordinate) && (xcoordinate < scaleCoordinates(object23.right))) && ((scaleCoordinates(object23.top) < ycoordinate) && (ycoordinate < scaleCoordinates(object23.bottom)))) {
return { return {
"name": object23.name, "name": object23.name,
"type": object23.type, "type": object23.type,
} }
} }
if ((xcoordinate < x_center) && (ycoordinate < y_center)) {
return {
"name": "topleft",
"type": "none"
}
}
if ((xcoordinate > x_center) && (ycoordinate < y_center)) {
return {
"name": "topright",
"type": "none"
}
}
if ((xcoordinate < x_center) && (ycoordinate > y_center)) {
return {
"name": "bottomleft",
"type": "none"
}
}
if ((xcoordinate > x_center) && (ycoordinate > y_center)) {
return { return {
"name": "none", "name": "bottomright",
"type": "none" "type": "none"
} }
} }
}
//slide9 //slide9
if (slide == "s9") { if (slide == "s9") {
object24 = boundaryArr[slide]["F9I1"] object24 = boundaryArr[slide]["F9I1"]
if (((object24.left < xcoordinate) && (xcoordinate < object24.right)) && ((object24.top < ycoordinate) && (ycoordinate < object24.bottom))) { if (((scaleCoordinates(object24.left) < xcoordinate) && (xcoordinate < scaleCoordinates(object24.right))) && ((scaleCoordinates(object24.top) < ycoordinate) && (ycoordinate < scaleCoordinates(object24.bottom)))) {
return { return {
"name": object24.name, "name": object24.name,
"type": object24.type, "type": object24.type,
...@@ -1150,37 +1350,57 @@ ...@@ -1150,37 +1350,57 @@
} }
object25 = boundaryArr[slide]["F9I2"] object25 = boundaryArr[slide]["F9I2"]
if (((object25.left < xcoordinate) && (xcoordinate < object25.right)) && ((object25.top < ycoordinate) && (ycoordinate < object25.bottom))) { if (((scaleCoordinates(object25.left) < xcoordinate) && (xcoordinate < scaleCoordinates(object25.right))) && ((scaleCoordinates(object25.top) < ycoordinate) && (ycoordinate < scaleCoordinates(object25.bottom)))) {
return { return {
"name": object25.name, "name": object25.name,
"type": object25.type, "type": object25.type,
} }
} }
object26 = boundaryArr[slide]["F9I3"] object26 = boundaryArr[slide]["F9I3"]
if (((object26.left < xcoordinate) && (xcoordinate < object26.right)) && ((object26.top < ycoordinate) && (ycoordinate < object26.bottom))) { if (((scaleCoordinates(object26.left) < xcoordinate) && (xcoordinate < scaleCoordinates(object26.right))) && ((scaleCoordinates(object26.top) < ycoordinate) && (ycoordinate < scaleCoordinates(object26.bottom)))) {
return { return {
"name": object26.name, "name": object26.name,
"type": object26.type, "type": object26.type,
} }
} }
object27 = boundaryArr[slide]["F9I4"] object27 = boundaryArr[slide]["F9I4"]
if (((object27.left < xcoordinate) && (xcoordinate < object27.right)) && ((object27.top < ycoordinate) && (ycoordinate < object27.bottom))) { if (((scaleCoordinates(object27.left) < xcoordinate) && (xcoordinate < scaleCoordinates(object27.right))) && ((scaleCoordinates(object27.top) < ycoordinate) && (ycoordinate < scaleCoordinates(object27.bottom)))) {
return { return {
"name": object27.name, "name": object27.name,
"type": object27.type, "type": object27.type,
} }
} }
if ((xcoordinate < x_center) && (ycoordinate < y_center)) {
return {
"name": "topleft",
"type": "none"
}
}
if ((xcoordinate > x_center) && (ycoordinate < y_center)) {
return {
"name": "topright",
"type": "none"
}
}
if ((xcoordinate < x_center) && (ycoordinate > y_center)) {
return {
"name": "bottomleft",
"type": "none"
}
}
if ((xcoordinate > x_center) && (ycoordinate > y_center)) {
return { return {
"name": "none", "name": "bottomright",
"type": "none" "type": "none"
} }
} }
}
//slide10 //slide10
if (slide == "s10") { if (slide == "s10") {
object28 = boundaryArr[slide]["F10I1"] object28 = boundaryArr[slide]["F10I1"]
if (((object28.left < xcoordinate) && (xcoordinate < object28.right)) && ((object28.top < ycoordinate) && (ycoordinate < object28.bottom))) { if (((scaleCoordinates(object28.left) < xcoordinate) && (xcoordinate < scaleCoordinates(object28.right))) && ((scaleCoordinates(object28.top) < ycoordinate) && (ycoordinate < scaleCoordinates(object28.bottom)))) {
return { return {
"name": object28.name, "name": object28.name,
"type": object28.type, "type": object28.type,
...@@ -1188,7 +1408,7 @@ ...@@ -1188,7 +1408,7 @@
} }
object29 = boundaryArr[slide]["F10I2"] object29 = boundaryArr[slide]["F10I2"]
if (((object29.left < xcoordinate) && (xcoordinate < object29.right)) && ((object29.top < ycoordinate) && (ycoordinate < object29.bottom))) { if (((scaleCoordinates(object29.left) < xcoordinate) && (xcoordinate < scaleCoordinates(object29.right))) && ((scaleCoordinates(object29.top) < ycoordinate) && (ycoordinate < scaleCoordinates(object29.bottom)))) {
return { return {
"name": object29.name, "name": object29.name,
"type": object29.type, "type": object29.type,
...@@ -1196,499 +1416,699 @@ ...@@ -1196,499 +1416,699 @@
} }
object30 = boundaryArr[slide]["F10I3"] object30 = boundaryArr[slide]["F10I3"]
if (((object30.left < xcoordinate) && (xcoordinate < object30.right)) && ((object30.top < ycoordinate) && (ycoordinate < object30.bottom))) { if (((scaleCoordinates(object30.left) < xcoordinate) && (xcoordinate < scaleCoordinates(object30.right))) && ((scaleCoordinates(object30.top) < ycoordinate) && (ycoordinate < scaleCoordinates(object30.bottom)))) {
return { return {
"name": object30.name, "name": object30.name,
"type": object30.type, "type": object30.type,
} }
} }
object31 = boundaryArr[slide]["F10I4"] object31 = boundaryArr[slide]["F10I4"]
if (((object31.left < xcoordinate) && (xcoordinate < object31.right)) && ((object31.top < ycoordinate) && (ycoordinate < object31.bottom))) { if (((scaleCoordinates(object31.left) < xcoordinate) && (xcoordinate < scaleCoordinates(object31.right))) && ((scaleCoordinates(object31.top) < ycoordinate) && (ycoordinate < scaleCoordinates(object31.bottom)))) {
return { return {
"name": object31.name, "name": object31.name,
"type": object31.type, "type": object31.type,
} }
} }
object32 = boundaryArr[slide]["F10I5"] object32 = boundaryArr[slide]["F10I5"]
if (((object32.left < xcoordinate) && (xcoordinate < object32.right)) && ((object32.top < ycoordinate) && (ycoordinate < object32.bottom))) { if (((scaleCoordinates(object32.left) < xcoordinate) && (xcoordinate < scaleCoordinates(object32.right))) && ((scaleCoordinates(object32.top) < ycoordinate) && (ycoordinate < scaleCoordinates(object32.bottom)))) {
return { return {
"name": object32.name, "name": object32.name,
"type": object32.type, "type": object32.type,
} }
} }
if ((xcoordinate < x_center) && (ycoordinate < y_center)) {
return {
"name": "topleft",
"type": "none"
}
}
if ((xcoordinate > x_center) && (ycoordinate < y_center)) {
return {
"name": "topright",
"type": "none"
}
}
if ((xcoordinate < x_center) && (ycoordinate > y_center)) {
return { return {
"name": "none", "name": "bottomleft",
"type": "none" "type": "none"
} }
} }
if ((xcoordinate > x_center) && (ycoordinate > y_center)) {
return {
"name": "bottomright",
"type": "none"
}
}
}
//slide11 //slide11
if (slide == "s11") { if (slide == "s11") {
object33 = boundaryArr[slide]["F11I1"] object33 = boundaryArr[slide]["F11I1"]
if (((object33.left < xcoordinate) && (xcoordinate < object33.right)) && ((object33.top < ycoordinate) && (ycoordinate < object33.bottom))) { if (((scaleCoordinates(object33.left) < xcoordinate) && (xcoordinate < scaleCoordinates(object33.right))) && ((scaleCoordinates(object33.top) < ycoordinate) && (ycoordinate < scaleCoordinates(object33.bottom)))) {
return { return {
"name": object33.name, "name": object33.name,
"type": object33.type, "type": object33.type,
} }
} }
object34 = boundaryArr[slide]["F11I2"] object34 = boundaryArr[slide]["F11I2"]
if (((object34.left < xcoordinate) && (xcoordinate < object34.right)) && ((object34.top < ycoordinate) && (ycoordinate < object34.bottom))) { if (((scaleCoordinates(object34.left) < xcoordinate) && (xcoordinate < scaleCoordinates(object34.right))) && ((scaleCoordinates(object34.top) < ycoordinate) && (ycoordinate < scaleCoordinates(object34.bottom)))) {
return { return {
"name": object34.name, "name": object34.name,
"type": object34.type, "type": object34.type,
} }
} }
object35 = boundaryArr[slide]["F11I3"] object35 = boundaryArr[slide]["F11I3"]
if (((object35.left < xcoordinate) && (xcoordinate < object35.right)) && ((object35.top < ycoordinate) && (ycoordinate < object35.bottom))) { if (((scaleCoordinates(object35.left) < xcoordinate) && (xcoordinate < scaleCoordinates(object35.right))) && ((scaleCoordinates(object35.top) < ycoordinate) && (ycoordinate < scaleCoordinates(object35.bottom)))) {
return { return {
"name": object35.name, "name": object35.name,
"type": object35.type, "type": object35.type,
} }
} }
object36 = boundaryArr[slide]["F11I4"] object36 = boundaryArr[slide]["F11I4"]
if (((object36.left < xcoordinate) && (xcoordinate < object36.right)) && ((object36.top < ycoordinate) && (ycoordinate < object36.bottom))) { if (((scaleCoordinates(object36.left) < xcoordinate) && (xcoordinate < scaleCoordinates(object36.right))) && ((scaleCoordinates(object36.top) < ycoordinate) && (ycoordinate < scaleCoordinates(object36.bottom)))) {
return { return {
"name": object36.name, "name": object36.name,
"type": object36.type, "type": object36.type,
} }
} }
object37 = boundaryArr[slide]["F11I5"] object37 = boundaryArr[slide]["F11I5"]
if (((object37.left < xcoordinate) && (xcoordinate < object37.right)) && ((object37.top < ycoordinate) && (ycoordinate < object37.bottom))) { if (((scaleCoordinates(object37.left) < xcoordinate) && (xcoordinate < scaleCoordinates(object37.right))) && ((scaleCoordinates(object37.top) < ycoordinate) && (ycoordinate < scaleCoordinates(object37.bottom)))) {
return { return {
"name": object37.name, "name": object37.name,
"type": object37.type, "type": object37.type,
} }
} }
object38 = boundaryArr[slide]["F11I6"] object38 = boundaryArr[slide]["F11I6"]
if (((object38.left < xcoordinate) && (xcoordinate < object38.right)) && ((object38.top < ycoordinate) && (ycoordinate < object38.bottom))) { if (((scaleCoordinates(object38.left) < xcoordinate) && (xcoordinate < scaleCoordinates(object38.right))) && ((scaleCoordinates(object38.top) < ycoordinate) && (ycoordinate < scaleCoordinates(object38.bottom)))) {
return { return {
"name": object38.name, "name": object38.name,
"type": object38.type, "type": object38.type,
} }
} }
if ((xcoordinate < x_center) && (ycoordinate < y_center)) {
return {
"name": "topleft",
"type": "none"
}
}
if ((xcoordinate > x_center) && (ycoordinate < y_center)) {
return { return {
"name": "none", "name": "topright",
"type": "none" "type": "none"
} }
} }
if ((xcoordinate < x_center) && (ycoordinate > y_center)) {
return {
"name": "bottomleft",
"type": "none"
}
}
if ((xcoordinate > x_center) && (ycoordinate > y_center)) {
return {
"name": "bottomright",
"type": "none"
}
}
}
//slide12 //slide12
if (slide == "s12") { if (slide == "s12") {
object39 = boundaryArr[slide]["F12I1"] object39 = boundaryArr[slide]["F12I1"]
if (((object39.left < xcoordinate) && (xcoordinate < object39.right)) && ((object39.top < ycoordinate) && (ycoordinate < object39.bottom))) { if (((scaleCoordinates(object39.left) < xcoordinate) && (xcoordinate < scaleCoordinates(object39.right))) && ((scaleCoordinates(object39.top) < ycoordinate) && (ycoordinate < scaleCoordinates(object39.bottom)))) {
return { return {
"name": object39.name, "name": object39.name,
"type": object39.type, "type": object39.type,
} }
} }
object40 = boundaryArr[slide]["F12I2"] object40 = boundaryArr[slide]["F12I2"]
if (((object40.left < xcoordinate) && (xcoordinate < object40.right)) && ((object40.top < ycoordinate) && (ycoordinate < object40.bottom))) { if (((scaleCoordinates(object40.left) < xcoordinate) && (xcoordinate < scaleCoordinates(object40.right))) && ((scaleCoordinates(object40.top) < ycoordinate) && (ycoordinate < scaleCoordinates(object40.bottom)))) {
return { return {
"name": object40.name, "name": object40.name,
"type": object40.type, "type": object40.type,
} }
} }
object41 = boundaryArr[slide]["F12I3"] object41 = boundaryArr[slide]["F12I3"]
if (((object41.left < xcoordinate) && (xcoordinate < object41.right)) && ((object41.top < ycoordinate) && (ycoordinate < object41.bottom))) { if (((scaleCoordinates(object41.left) < xcoordinate) && (xcoordinate < scaleCoordinates(object41.right))) && ((scaleCoordinates(object41.top) < ycoordinate) && (ycoordinate < scaleCoordinates(object41.bottom)))) {
return { return {
"name": object41.name, "name": object41.name,
"type": object41.type, "type": object41.type,
} }
} }
object42 = boundaryArr[slide]["F12I4"] object42 = boundaryArr[slide]["F12I4"]
if (((object42.left < xcoordinate) && (xcoordinate < object42.right)) && ((object42.top < ycoordinate) && (ycoordinate < object42.bottom))) { if (((scaleCoordinates(object42.left) < xcoordinate) && (xcoordinate < scaleCoordinates(object42.right))) && ((scaleCoordinates(object42.top) < ycoordinate) && (ycoordinate < scaleCoordinates(object42.bottom)))) {
return { return {
"name": object42.name, "name": object42.name,
"type": object42.type, "type": object42.type,
} }
} }
object43 = boundaryArr[slide]["F12I5"] object43 = boundaryArr[slide]["F12I5"]
if (((object43.left < xcoordinate) && (xcoordinate < object43.right)) && ((object43.top < ycoordinate) && (ycoordinate < object43.bottom))) { if (((scaleCoordinates(object43.left) < xcoordinate) && (xcoordinate < scaleCoordinates(object43.right))) && ((scaleCoordinates(object43.top) < ycoordinate) && (ycoordinate < scaleCoordinates(object43.bottom)))) {
return { return {
"name": object43.name, "name": object43.name,
"type": object43.type, "type": object43.type,
} }
} }
object44 = boundaryArr[slide]["F12I6"] object44 = boundaryArr[slide]["F12I6"]
if (((object44.left < xcoordinate) && (xcoordinate < object44.right)) && ((object44.top < ycoordinate) && (ycoordinate < object44.bottom))) { if (((scaleCoordinates(object44.left) < xcoordinate) && (xcoordinate < scaleCoordinates(object44.right))) && ((scaleCoordinates(object44.top) < ycoordinate) && (ycoordinate < scaleCoordinates(object44.bottom)))) {
return { return {
"name": object44.name, "name": object44.name,
"type": object44.type, "type": object44.type,
} }
} }
if ((xcoordinate < x_center) && (ycoordinate < y_center)) {
return {
"name": "topleft",
"type": "none"
}
}
if ((xcoordinate > x_center) && (ycoordinate < y_center)) {
return {
"name": "topright",
"type": "none"
}
}
if ((xcoordinate < x_center) && (ycoordinate > y_center)) {
return {
"name": "bottomleft",
"type": "none"
}
}
if ((xcoordinate > x_center) && (ycoordinate > y_center)) {
return { return {
"name": "none", "name": "bottomright",
"type": "none" "type": "none"
} }
} }
}
//slide13 //slide13
if (slide == "s13") { if (slide == "s13") {
object45 = boundaryArr[slide]["F13I1"] object45 = boundaryArr[slide]["F13I1"]
if (((object45.left < xcoordinate) && (xcoordinate < object45.right)) && ((object45.top < ycoordinate) && (ycoordinate < object45.bottom))) { if (((scaleCoordinates(object45.left) < xcoordinate) && (xcoordinate < scaleCoordinates(object45.right))) && ((scaleCoordinates(object45.top) < ycoordinate) && (ycoordinate < scaleCoordinates(object45.bottom)))) {
return { return {
"name": object45.name, "name": object45.name,
"type": object45.type, "type": object45.type,
} }
} }
object46 = boundaryArr[slide]["F13I2"] object46 = boundaryArr[slide]["F13I2"]
if (((object46.left < xcoordinate) && (xcoordinate < object46.right)) && ((object46.top < ycoordinate) && (ycoordinate < object46.bottom))) { if (((scaleCoordinates(object46.left) < xcoordinate) && (xcoordinate < scaleCoordinates(object46.right))) && ((scaleCoordinates(object46.top) < ycoordinate) && (ycoordinate < scaleCoordinates(object46.bottom)))) {
return { return {
"name": object46.name, "name": object46.name,
"type": object46.type, "type": object46.type,
} }
} }
object47 = boundaryArr[slide]["F13I3"] object47 = boundaryArr[slide]["F13I3"]
if (((object47.left < xcoordinate) && (xcoordinate < object47.right)) && ((object47.top < ycoordinate) && (ycoordinate < object47.bottom))) { if (((scaleCoordinates(object47.left) < xcoordinate) && (xcoordinate < scaleCoordinates(object47.right))) && ((scaleCoordinates(object47.top) < ycoordinate) && (ycoordinate < scaleCoordinates(object47.bottom)))) {
return { return {
"name": object47.name, "name": object47.name,
"type": object47.type, "type": object47.type,
} }
} }
object48 = boundaryArr[slide]["F13I4"] object48 = boundaryArr[slide]["F13I4"]
if (((object48.left < xcoordinate) && (xcoordinate < object48.right)) && ((object48.top < ycoordinate) && (ycoordinate < object48.bottom))) { if (((scaleCoordinates(object48.left) < xcoordinate) && (xcoordinate < scaleCoordinates(object48.right))) && ((scaleCoordinates(object48.top) < ycoordinate) && (ycoordinate < scaleCoordinates(object48.bottom)))) {
return { return {
"name": object48.name, "name": object48.name,
"type": object48.type, "type": object48.type,
} }
} }
object49 = boundaryArr[slide]["F13I5"] object49 = boundaryArr[slide]["F13I5"]
if (((object49.left < xcoordinate) && (xcoordinate < object49.right)) && ((object49.top < ycoordinate) && (ycoordinate < object49.bottom))) { if (((scaleCoordinates(object49.left) < xcoordinate) && (xcoordinate < scaleCoordinates(object49.right))) && ((scaleCoordinates(object49.top) < ycoordinate) && (ycoordinate < scaleCoordinates(object49.bottom)))) {
return { return {
"name": object49.name, "name": object49.name,
"type": object49.type, "type": object49.type,
} }
} }
object50 = boundaryArr[slide]["F13I6"] object50 = boundaryArr[slide]["F13I6"]
if (((object50.left < xcoordinate) && (xcoordinate < object50.right)) && ((object50.top < ycoordinate) && (ycoordinate < object50.bottom))) { if (((scaleCoordinates(object50.left) < xcoordinate) && (xcoordinate < scaleCoordinates(object50.right))) && ((scaleCoordinates(object50.top) < ycoordinate) && (ycoordinate < scaleCoordinates(object50.bottom)))) {
return { return {
"name": object50.name, "name": object50.name,
"type": object50.type, "type": object50.type,
} }
} }
if ((xcoordinate < x_center) && (ycoordinate < y_center)) {
return {
"name": "topleft",
"type": "none"
}
}
if ((xcoordinate > x_center) && (ycoordinate < y_center)) {
return {
"name": "topright",
"type": "none"
}
}
if ((xcoordinate < x_center) && (ycoordinate > y_center)) {
return { return {
"name": "none", "name": "bottomleft",
"type": "none" "type": "none"
} }
} }
if ((xcoordinate > x_center) && (ycoordinate > y_center)) {
return {
"name": "bottomright",
"type": "none"
}
}
}
//slide14 //slide14
if (slide == "s14") { if (slide == "s14") {
object51 = boundaryArr[slide]["F14I1"] object51 = boundaryArr[slide]["F14I1"]
if (((object51.left < xcoordinate) && (xcoordinate < object51.right)) && ((object51.top < ycoordinate) && (ycoordinate < object51.bottom))) { if (((scaleCoordinates(object51.left) < xcoordinate) && (xcoordinate < scaleCoordinates(object51.right))) && ((scaleCoordinates(object51.top) < ycoordinate) && (ycoordinate < scaleCoordinates(object51.bottom)))) {
return { return {
"name": object51.name, "name": object51.name,
"type": object51.type, "type": object51.type,
} }
} }
object52 = boundaryArr[slide]["F14I2"] object52 = boundaryArr[slide]["F14I2"]
if (((object52.left < xcoordinate) && (xcoordinate < object52.right)) && ((object52.top < ycoordinate) && (ycoordinate < object52.bottom))) { if (((scaleCoordinates(object52.left) < xcoordinate) && (xcoordinate < scaleCoordinates(object52.right))) && ((scaleCoordinates(object52.top) < ycoordinate) && (ycoordinate < scaleCoordinates(object52.bottom)))) {
return { return {
"name": object52.name, "name": object52.name,
"type": object52.type, "type": object52.type,
} }
} }
object53 = boundaryArr[slide]["F14I3"] object53 = boundaryArr[slide]["F14I3"]
if (((object53.left < xcoordinate) && (xcoordinate < object53.right)) && ((object53.top < ycoordinate) && (ycoordinate < object53.bottom))) { if (((scaleCoordinates(object53.left) < xcoordinate) && (xcoordinate < scaleCoordinates(object53.right))) && ((scaleCoordinates(object53.top) < ycoordinate) && (ycoordinate < scaleCoordinates(object53.bottom)))) {
return { return {
"name": object53.name, "name": object53.name,
"type": object53.type, "type": object53.type,
} }
} }
object54 = boundaryArr[slide]["F14I4"] object54 = boundaryArr[slide]["F14I4"]
if (((object54.left < xcoordinate) && (xcoordinate < object54.right)) && ((object54.top < ycoordinate) && (ycoordinate < object54.bottom))) { if (((scaleCoordinates(object54.left) < xcoordinate) && (xcoordinate < scaleCoordinates(object54.right))) && ((scaleCoordinates(object54.top) < ycoordinate) && (ycoordinate < scaleCoordinates(object54.bottom)))) {
return { return {
"name": object54.name, "name": object54.name,
"type": object54.type, "type": object54.type,
} }
} }
object55 = boundaryArr[slide]["F14I5"] object55 = boundaryArr[slide]["F14I5"]
if (((object55.left < xcoordinate) && (xcoordinate < object55.right)) && ((object55.top < ycoordinate) && (ycoordinate < object55.bottom))) { if (((scaleCoordinates(object55.left) < xcoordinate) && (xcoordinate < scaleCoordinates(object55.right))) && ((scaleCoordinates(object55.top) < ycoordinate) && (ycoordinate < scaleCoordinates(object55.bottom)))) {
return { return {
"name": object55.name, "name": object55.name,
"type": object55.type, "type": object55.type,
} }
} }
object56 = boundaryArr[slide]["F14I6"] object56 = boundaryArr[slide]["F14I6"]
if (((object56.left < xcoordinate) && (xcoordinate < object56.right)) && ((object56.top < ycoordinate) && (ycoordinate < object56.bottom))) { if (((scaleCoordinates(object56.left) < xcoordinate) && (xcoordinate < scaleCoordinates(object56.right))) && ((scaleCoordinates(object56.top) < ycoordinate) && (ycoordinate < scaleCoordinates(object56.bottom)))) {
return { return {
"name": object56.name, "name": object56.name,
"type": object56.type, "type": object56.type,
} }
} }
if ((xcoordinate < x_center) && (ycoordinate < y_center)) {
return {
"name": "topleft",
"type": "none"
}
}
if ((xcoordinate > x_center) && (ycoordinate < y_center)) {
return {
"name": "topright",
"type": "none"
}
}
if ((xcoordinate < x_center) && (ycoordinate > y_center)) {
return {
"name": "bottomleft",
"type": "none"
}
}
if ((xcoordinate > x_center) && (ycoordinate > y_center)) {
return { return {
"name": "none", "name": "bottomright",
"type": "none" "type": "none"
} }
} }
}
//slide15 //slide15
if (slide == "s15") { if (slide == "s15") {
object57 = boundaryArr[slide]["F15I1"] object57 = boundaryArr[slide]["F15I1"]
if (((object57.left < xcoordinate) && (xcoordinate < object57.right)) && ((object57.top < ycoordinate) && (ycoordinate < object57.bottom))) { if (((scaleCoordinates(object57.left) < xcoordinate) && (xcoordinate < scaleCoordinates(object57.right))) && ((scaleCoordinates(object57.top) < ycoordinate) && (ycoordinate < scaleCoordinates(object57.bottom)))) {
return { return {
"name": object57.name, "name": object57.name,
"type": object57.type, "type": object57.type,
} }
} }
object58 = boundaryArr[slide]["F15I2"] object58 = boundaryArr[slide]["F15I2"]
if (((object58.left < xcoordinate) && (xcoordinate < object58.right)) && ((object58.top < ycoordinate) && (ycoordinate < object58.bottom))) { if (((scaleCoordinates(object58.left) < xcoordinate) && (xcoordinate < scaleCoordinates(object58.right))) && ((scaleCoordinates(object58.top) < ycoordinate) && (ycoordinate < scaleCoordinates(object58.bottom)))) {
return { return {
"name": object58.name, "name": object58.name,
"type": object58.type, "type": object58.type,
} }
} }
object59 = boundaryArr[slide]["F15I3"] object59 = boundaryArr[slide]["F15I3"]
if (((object59.left < xcoordinate) && (xcoordinate < object59.right)) && ((object59.top < ycoordinate) && (ycoordinate < object59.bottom))) { if (((scaleCoordinates(object59.left) < xcoordinate) && (xcoordinate < scaleCoordinates(object59.right))) && ((scaleCoordinates(object59.top) < ycoordinate) && (ycoordinate < scaleCoordinates(object59.bottom)))) {
return { return {
"name": object59.name, "name": object59.name,
"type": object59.type, "type": object59.type,
} }
} }
object60 = boundaryArr[slide]["F15I4"] object60 = boundaryArr[slide]["F15I4"]
if (((object60.left < xcoordinate) && (xcoordinate < object60.right)) && ((object60.top < ycoordinate) && (ycoordinate < object60.bottom))) { if (((scaleCoordinates(object60.left) < xcoordinate) && (xcoordinate < scaleCoordinates(object60.right))) && ((scaleCoordinates(object60.top) < ycoordinate) && (ycoordinate < scaleCoordinates(object60.bottom)))) {
return { return {
"name": object60.name, "name": object60.name,
"type": object60.type, "type": object60.type,
} }
} }
object61 = boundaryArr[slide]["F15I5"] object61 = boundaryArr[slide]["F15I5"]
if (((object61.left < xcoordinate) && (xcoordinate < object61.right)) && ((object61.top < ycoordinate) && (ycoordinate < object61.bottom))) { if (((scaleCoordinates(object61.left) < xcoordinate) && (xcoordinate < scaleCoordinates(object61.right))) && ((scaleCoordinates(object61.top) < ycoordinate) && (ycoordinate < scaleCoordinates(object61.bottom)))) {
return { return {
"name": object61.name, "name": object61.name,
"type": object61.type, "type": object61.type,
} }
} }
object62 = boundaryArr[slide]["F15I6"] object62 = boundaryArr[slide]["F15I6"]
if (((object62.left < xcoordinate) && (xcoordinate < object62.right)) && ((object62.top < ycoordinate) && (ycoordinate < object62.bottom))) { if (((scaleCoordinates(object62.left) < xcoordinate) && (xcoordinate < scaleCoordinates(object62.right))) && ((scaleCoordinates(object62.top) < ycoordinate) && (ycoordinate < scaleCoordinates(object62.bottom)))) {
return { return {
"name": object62.name, "name": object62.name,
"type": object62.type, "type": object62.type,
} }
} }
if ((xcoordinate < x_center) && (ycoordinate < y_center)) {
return {
"name": "topleft",
"type": "none"
}
}
if ((xcoordinate > x_center) && (ycoordinate < y_center)) {
return {
"name": "topright",
"type": "none"
}
}
if ((xcoordinate < x_center) && (ycoordinate > y_center)) {
return { return {
"name": "none", "name": "bottomleft",
"type": "none" "type": "none"
} }
} }
if ((xcoordinate > x_center) && (ycoordinate > y_center)) {
return {
"name": "bottomright",
"type": "none"
}
}
}
//slide16 //slide16
if (slide == "s16") { if (slide == "s16") {
object63 = boundaryArr[slide]["F16I1"] object63 = boundaryArr[slide]["F16I1"]
if (((object63.left < xcoordinate) && (xcoordinate < object63.right)) && ((object63.top < ycoordinate) && (ycoordinate < object63.bottom))) { if (((scaleCoordinates(object63.left) < xcoordinate) && (xcoordinate < scaleCoordinates(object63.right))) && ((scaleCoordinates(object63.top) < ycoordinate) && (ycoordinate < scaleCoordinates(object63.bottom)))) {
return { return {
"name": object63.name, "name": object63.name,
"type": object63.type, "type": object63.type,
} }
} }
object64 = boundaryArr[slide]["F16I2"] object64 = boundaryArr[slide]["F16I2"]
if (((object64.left < xcoordinate) && (xcoordinate < object64.right)) && ((object64.top < ycoordinate) && (ycoordinate < object64.bottom))) { if (((scaleCoordinates(object64.left) < xcoordinate) && (xcoordinate < scaleCoordinates(object64.right))) && ((scaleCoordinates(object64.top) < ycoordinate) && (ycoordinate < scaleCoordinates(object64.bottom)))) {
return { return {
"name": object64.name, "name": object64.name,
"type": object64.type, "type": object64.type,
} }
} }
object65 = boundaryArr[slide]["F16I3"] object65 = boundaryArr[slide]["F16I3"]
if (((object65.left < xcoordinate) && (xcoordinate < object65.right)) && ((object65.top < ycoordinate) && (ycoordinate < object65.bottom))) { if (((scaleCoordinates(object65.left) < xcoordinate) && (xcoordinate < scaleCoordinates(object65.right))) && ((scaleCoordinates(object65.top) < ycoordinate) && (ycoordinate < scaleCoordinates(object65.bottom)))) {
return { return {
"name": object65.name, "name": object65.name,
"type": object65.type, "type": object65.type,
} }
} }
object66 = boundaryArr[slide]["F16I4"] object66 = boundaryArr[slide]["F16I4"]
if (((object66.left < xcoordinate) && (xcoordinate < object66.right)) && ((object66.top < ycoordinate) && (ycoordinate < object66.bottom))) { if (((scaleCoordinates(object66.left) < xcoordinate) && (xcoordinate < scaleCoordinates(object66.right))) && ((scaleCoordinates(object66.top) < ycoordinate) && (ycoordinate < scaleCoordinates(object66.bottom)))) {
return { return {
"name": object66.name, "name": object66.name,
"type": object66.type, "type": object66.type,
} }
} }
object67 = boundaryArr[slide]["F16I5"] object67 = boundaryArr[slide]["F16I5"]
if (((object67.left < xcoordinate) && (xcoordinate < object67.right)) && ((object67.top < ycoordinate) && (ycoordinate < object67.bottom))) { if (((scaleCoordinates(object67.left) < xcoordinate) && (xcoordinate < scaleCoordinates(object67.right))) && ((scaleCoordinates(object67.top) < ycoordinate) && (ycoordinate < scaleCoordinates(object67.bottom)))) {
return { return {
"name": object67.name, "name": object67.name,
"type": object67.type, "type": object67.type,
} }
} }
object68 = boundaryArr[slide]["F16I6"] object68 = boundaryArr[slide]["F16I6"]
if (((object68.left < xcoordinate) && (xcoordinate < object68.right)) && ((object68.top < ycoordinate) && (ycoordinate < object68.bottom))) { if (((scaleCoordinates(object68.left) < xcoordinate) && (xcoordinate < scaleCoordinates(object68.right))) && ((scaleCoordinates(object68.top) < ycoordinate) && (ycoordinate < scaleCoordinates(object68.bottom)))) {
return { return {
"name": object68.name, "name": object68.name,
"type": object68.type, "type": object68.type,
} }
} }
if ((xcoordinate < x_center) && (ycoordinate < y_center)) {
return {
"name": "topleft",
"type": "none"
}
}
if ((xcoordinate > x_center) && (ycoordinate < y_center)) {
return {
"name": "topright",
"type": "none"
}
}
if ((xcoordinate < x_center) && (ycoordinate > y_center)) {
return {
"name": "bottomleft",
"type": "none"
}
}
if ((xcoordinate > x_center) && (ycoordinate > y_center)) {
return { return {
"name": "none", "name": "bottomright",
"type": "none" "type": "none"
} }
} }
}
//slide17 //slide17
if (slide == "s17") { if (slide == "s17") {
object69 = boundaryArr[slide]["F17I1"] object69 = boundaryArr[slide]["F17I1"]
if (((object69.left < xcoordinate) && (xcoordinate < object69.right)) && ((object69.top < ycoordinate) && (ycoordinate < object69.bottom))) { if (((scaleCoordinates(object69.left) < xcoordinate) && (xcoordinate < scaleCoordinates(object69.right))) && ((scaleCoordinates(object69.top) < ycoordinate) && (ycoordinate < scaleCoordinates(object69.bottom)))) {
return { return {
"name": object69.name, "name": object69.name,
"type": object69.type, "type": object69.type,
} }
} }
object70 = boundaryArr[slide]["F17I2"] object70 = boundaryArr[slide]["F17I2"]
if (((object70.left < xcoordinate) && (xcoordinate < object70.right)) && ((object70.top < ycoordinate) && (ycoordinate < object70.bottom))) { if (((scaleCoordinates(object70.left) < xcoordinate) && (xcoordinate < scaleCoordinates(object70.right))) && ((scaleCoordinates(object70.top) < ycoordinate) && (ycoordinate < scaleCoordinates(object70.bottom)))) {
return { return {
"name": object70.name, "name": object70.name,
"type": object70.type, "type": object70.type,
} }
} }
object71 = boundaryArr[slide]["F17I3"] object71 = boundaryArr[slide]["F17I3"]
if (((object71.left < xcoordinate) && (xcoordinate < object71.right)) && ((object71.top < ycoordinate) && (ycoordinate < object71.bottom))) { if (((scaleCoordinates(object71.left) < xcoordinate) && (xcoordinate < scaleCoordinates(object71.right))) && ((scaleCoordinates(object71.top) < ycoordinate) && (ycoordinate < objescaleCoordinates(ct71.bottom)))) {
return { return {
"name": object71.name, "name": object71.name,
"type": object71.type, "type": object71.type,
} }
} }
object72 = boundaryArr[slide]["F17I4"] object72 = boundaryArr[slide]["F17I4"]
if (((object72.left < xcoordinate) && (xcoordinate < object72.right)) && ((object72.top < ycoordinate) && (ycoordinate < object72.bottom))) { if (((scaleCoordinates(object72.left) < xcoordinate) && (xcoordinate < scaleCoordinates(object72.right))) && ((scaleCoordinates(object72.top) < ycoordinate) && (ycoordinate < scaleCoordinates(object72.bottom)))) {
return { return {
"name": object72.name, "name": object72.name,
"type": object72.type, "type": object72.type,
} }
} }
object73 = boundaryArr[slide]["F17I5"] object73 = boundaryArr[slide]["F17I5"]
if (((object73.left < xcoordinate) && (xcoordinate < object73.right)) && ((object73.top < ycoordinate) && (ycoordinate < object73.bottom))) { if (((scaleCoordinates(object73.left) < xcoordinate) && (xcoordinate < scaleCoordinates(object73.right))) && ((scaleCoordinates(object73.top) < ycoordinate) && (ycoordinate < scaleCoordinates(object73.bottom)))) {
return { return {
"name": object73.name, "name": object73.name,
"type": object73.type, "type": object73.type,
} }
} }
object74 = boundaryArr[slide]["F17I6"] object74 = boundaryArr[slide]["F17I6"]
if (((object74.left < xcoordinate) && (xcoordinate < object74.right)) && ((object74.top < ycoordinate) && (ycoordinate < object74.bottom))) { if (((scaleCoordinates(object74.left) < xcoordinate) && (xcoordinate < scaleCoordinates(object74.right))) && ((scaleCoordinates(object74.top) < ycoordinate) && (ycoordinate < scaleCoordinates(object74.bottom)))) {
return { return {
"name": object74.name, "name": object74.name,
"type": object74.type, "type": object74.type,
} }
} }
if ((xcoordinate < x_center) && (ycoordinate < y_center)) {
return {
"name": "topleft",
"type": "none"
}
}
if ((xcoordinate > x_center) && (ycoordinate < y_center)) {
return {
"name": "topright",
"type": "none"
}
}
if ((xcoordinate < x_center) && (ycoordinate > y_center)) {
return {
"name": "bottomleft",
"type": "none"
}
}
if ((xcoordinate > x_center) && (ycoordinate > y_center)) {
return { return {
"name": "none", "name": "bottomright",
"type": "none" "type": "none"
} }
} }
}
//slide18 //slide18
if (slide == "s18") { if (slide == "s18") {
object75 = boundaryArr[slide]["F18I1"] object75 = boundaryArr[slide]["F18I1"]
if (((object75.left < xcoordinate) && (xcoordinate < object75.right)) && ((object75.top < ycoordinate) && (ycoordinate < object75.bottom))) { if (((scaleCoordinates(object75.left) < xcoordinate) && (xcoordinate < scaleCoordinates(object75.right))) && ((scaleCoordinates(object75.top) < ycoordinate) && (ycoordinate < scaleCoordinates(object75.bottom)))) {
return { return {
"name": object75.name, "name": object75.name,
"type": object75.type, "type": object75.type,
} }
} }
object76 = boundaryArr[slide]["F18I2"] object76 = boundaryArr[slide]["F18I2"]
if (((object76.left < xcoordinate) && (xcoordinate < object76.right)) && ((object76.top < ycoordinate) && (ycoordinate < object76.bottom))) { if (((scaleCoordinates(object76.left) < xcoordinate) && (xcoordinate < scaleCoordinates(object76.right))) && ((scaleCoordinates(object76.top) < ycoordinate) && (ycoordinate < scaleCoordinates(object76.bottom)))) {
return { return {
"name": object76.name, "name": object76.name,
"type": object76.type, "type": object76.type,
} }
} }
object77 = boundaryArr[slide]["F18I3"] object77 = boundaryArr[slide]["F18I3"]
if (((object77.left < xcoordinate) && (xcoordinate < object77.right)) && ((object77.top < ycoordinate) && (ycoordinate < object77.bottom))) { if (((scaleCoordinates(object77.left) < xcoordinate) && (xcoordinate < scaleCoordinates(object77.right))) && ((scaleCoordinates(object77.top) < ycoordinate) && (ycoordinate < scaleCoordinates(object77.bottom)))) {
return { return {
"name": object77.name, "name": object77.name,
"type": object77.type, "type": object77.type,
} }
} }
object78 = boundaryArr[slide]["F18I4"] object78 = boundaryArr[slide]["F18I4"]
if (((object78.left < xcoordinate) && (xcoordinate < object78.right)) && ((object78.top < ycoordinate) && (ycoordinate < object78.bottom))) { if (((scaleCoordinates(object78.left) < xcoordinate) && (xcoordinate < scaleCoordinates(object78.right))) && ((scaleCoordinates(object78.top) < ycoordinate) && (ycoordinate < scaleCoordinates(object78.bottom)))) {
return { return {
"name": object78.name, "name": object78.name,
"type": object78.type, "type": object78.type,
} }
} }
object79 = boundaryArr[slide]["F18I5"] object79 = boundaryArr[slide]["F18I5"]
if (((object79.left < xcoordinate) && (xcoordinate < object79.right)) && ((object79.top < ycoordinate) && (ycoordinate < object79.bottom))) { if (((scaleCoordinates(object79.left) < xcoordinate) && (xcoordinate < scaleCoordinates(object79.right))) && ((scaleCoordinates(object79.top) < ycoordinate) && (ycoordinate < scaleCoordinates(object79.bottom)))) {
return { return {
"name": object79.name, "name": object79.name,
"type": object79.type, "type": object79.type,
} }
} }
object80 = boundaryArr[slide]["F18I6"] object80 = boundaryArr[slide]["F18I6"]
if (((object80.left < xcoordinate) && (xcoordinate < object80.right)) && ((object80.top < ycoordinate) && (ycoordinate < object80.bottom))) { if (((scaleCoordinates(object80.left) < xcoordinate) && (xcoordinate < scaleCoordinates(object80.right))) && ((scaleCoordinates(object80.top) < ycoordinate) && (ycoordinate < scaleCoordinates(object80.bottom)))) {
return { return {
"name": object80.name, "name": object80.name,
"type": object80.type, "type": object80.type,
} }
} }
if ((xcoordinate < x_center) && (ycoordinate < y_center)) {
return {
"name": "topleft",
"type": "none"
}
}
if ((xcoordinate > x_center) && (ycoordinate < y_center)) {
return {
"name": "topright",
"type": "none"
}
}
if ((xcoordinate < x_center) && (ycoordinate > y_center)) {
return {
"name": "bottomleft",
"type": "none"
}
}
if ((xcoordinate > x_center) && (ycoordinate > y_center)) {
return { return {
"name": "none", "name": "bottomright",
"type": "none" "type": "none"
} }
} }
}
//slide19 //slide19
if (slide == "s19") { if (slide == "s19") {
object81 = boundaryArr[slide]["F19I1"] object81 = boundaryArr[slide]["F19I1"]
if (((object81.left < xcoordinate) && (xcoordinate < object81.right)) && ((object81.top < ycoordinate) && (ycoordinate < object81.bottom))) { if (((scaleCoordinates(object81.left) < xcoordinate) && (xcoordinate < scaleCoordinates(object81.right))) && ((scaleCoordinates(object81.top) < ycoordinate) && (ycoordinate < scaleCoordinates(object81.bottom)))) {
return { return {
"name": object81.name, "name": object81.name,
"type": object81.type, "type": object81.type,
} }
} }
object82 = boundaryArr[slide]["F19I2"] object82 = boundaryArr[slide]["F19I2"]
if (((object82.left < xcoordinate) && (xcoordinate < object82.right)) && ((object82.top < ycoordinate) && (ycoordinate < object82.bottom))) { if (((scaleCoordinates(object82.left) < xcoordinate) && (xcoordinate < scaleCoordinates(object82.right))) && ((scaleCoordinates(object82.top) < ycoordinate) && (ycoordinate < scaleCoordinates(object82.bottom)))) {
return { return {
"name": object82.name, "name": object82.name,
"type": object82.type, "type": object82.type,
} }
} }
object83 = boundaryArr[slide]["F19I3"] object83 = boundaryArr[slide]["F19I3"]
if (((object83.left < xcoordinate) && (xcoordinate < object83.right)) && ((object83.top < ycoordinate) && (ycoordinate < object83.bottom))) { if (((scaleCoordinates(object83.left) < xcoordinate) && (xcoordinate < scaleCoordinates(object83.right))) && ((scaleCoordinates(object83.top) < ycoordinate) && (ycoordinate < scaleCoordinates(object83.bottom)))) {
return { return {
"name": object83.name, "name": object83.name,
"type": object83.type, "type": object83.type,
} }
} }
object84 = boundaryArr[slide]["F19I4"] object84 = boundaryArr[slide]["F19I4"]
if (((object84.left < xcoordinate) && (xcoordinate < object84.right)) && ((object84.top < ycoordinate) && (ycoordinate < object84.bottom))) { if (((scaleCoordinates(object84.left) < xcoordinate) && (xcoordinate < scaleCoordinates(object84.right))) && ((scaleCoordinates(object84.top) < ycoordinate) && (ycoordinate < scaleCoordinates(object84.bottom)))) {
return { return {
"name": object84.name, "name": object84.name,
"type": object84.type, "type": object84.type,
} }
} }
object85 = boundaryArr[slide]["F19I5"] object85 = boundaryArr[slide]["F19I5"]
if (((object85.left < xcoordinate) && (xcoordinate < object85.right)) && ((object85.top < ycoordinate) && (ycoordinate < object85.bottom))) { if (((scaleCoordinates(object85.left) < xcoordinate) && (xcoordinate < scaleCoordinates(object85.right))) && ((scaleCoordinates(object85.top) < ycoordinate) && (ycoordinate < scaleCoordinates(object85.bottom)))) {
return { return {
"name": object85.name, "name": object85.name,
"type": object85.type, "type": object85.type,
} }
} }
object86 = boundaryArr[slide]["F19I6"] object86 = boundaryArr[slide]["F19I6"]
if (((object86.left < xcoordinate) && (xcoordinate < object86.right)) && ((object86.top < ycoordinate) && (ycoordinate < object86.bottom))) { if (((scaleCoordinates(object86.left) < xcoordinate) && (xcoordinate < scaleCoordinates(object86.right))) && ((scaleCoordinates(object86.top) < ycoordinate) && (ycoordinate < scaleCoordinates(object86.bottom)))) {
return { return {
"name": object86.name, "name": object86.name,
"type": object86.type, "type": object86.type,
} }
} }
if ((xcoordinate < x_center) && (ycoordinate < y_center)) {
return {
"name": "topleft",
"type": "none"
}
}
if ((xcoordinate > x_center) && (ycoordinate < y_center)) {
return {
"name": "topright",
"type": "none"
}
}
if ((xcoordinate < x_center) && (ycoordinate > y_center)) {
return { return {
"name": "none", "name": "bottomleft",
"type": "none" "type": "none"
} }
} }
if ((xcoordinate > x_center) && (ycoordinate > y_center)) {
return {
"name": "bottomright",
"type": "none"
}
}
}
} }
...@@ -1722,15 +2142,24 @@ ...@@ -1722,15 +2142,24 @@
clearTimeout(tempT) clearTimeout(tempT)
webgazer.pause(); webgazer.pause();
taskPaused = true; taskPaused = true;
pausedTime = Date.now();
console.log("pausedTime");
console.log(pausedTime);
console.log("pausedTime");
} }
} }
function resumeTask() { function resumeTask() {
if (taskPaused) { if (taskPaused) {
console.log("resumed"); console.log("resumed");
taskLoop = setInterval(showSlide, 9000); startTime = startTime + (Date.now() - pausedTime);
console.log("startTime");
console.log(startTime);
console.log("startTime");
taskLoop = setInterval(showSlide, 10000);
webgazer.resume(); webgazer.resume();
taskPaused = false; taskPaused = false;
} }
} }
...@@ -1743,7 +2172,7 @@ ...@@ -1743,7 +2172,7 @@
slide = "result"; slide = "result";
clearInterval(taskLoop); clearInterval(taskLoop);
$("#objectName").text("none") //$("#objectName").text("none")
webgazer.pause(); webgazer.pause();
//calculate object percentages for each slide //calculate object percentages for each slide
...@@ -1783,12 +2212,17 @@ ...@@ -1783,12 +2212,17 @@
} }
function calculatePercentArray2(arr, percentArr2) { function calculatePercentArray2(arr, percentArr2) {
OListAll = [];
for (let slide in arr) { for (let slide in arr) {
OList = arr[slide].map((x) => { OList = arr[slide].map((x) => {
return x.type return x.type
}) })
console.log("OList 1")
console.log(OList)
OListAll = OListAll.concat(OList);
const count = {}; const count = {};
for (const element of OList) { for (const element of OList) {
...@@ -1807,6 +2241,25 @@ ...@@ -1807,6 +2241,25 @@
} }
} }
const count2 = {};
console.log("OListAll 1")
console.log(OListAll)
for (const element of OListAll) {
if (count2[element]) {
count2[element] += 1;
} else {
count2[element] = 1;
}
}
console.log("OListAll 2")
console.log(OListAll)
var tot2 = OListAll.length
percentArr2["sall"] = {}
for (let type in count2) {
percentArr2["sall"][type] = 100 * count2[type] / tot2
}
} }
var tempT; var tempT;
...@@ -1822,7 +2275,7 @@ ...@@ -1822,7 +2275,7 @@
slideID = "#s" + parseInt(increment); slideID = "#s" + parseInt(increment);
$("#ch").show(); $("#ch").show();
$("#objectName").text("none") // $("#objectName").text("none")
slide = "ch"; slide = "ch";
tempT = setTimeout(function () { tempT = setTimeout(function () {
$("#ch").hide(); $("#ch").hide();
...@@ -1871,10 +2324,13 @@ ...@@ -1871,10 +2324,13 @@
}; };
function drawChart(slideNumber, array, chart, canvasName, chartTitle){ function drawChart(slideNumber, array, chart, canvasName, chartTitle) {
$("#" + canvasName).hide();
var slidename = "s" + slideNumber; var slidename = "s" + slideNumber;
if(!array[slidename]){
return;
}
var labelsArr = Object.getOwnPropertyNames(array[slidename]); var labelsArr = Object.getOwnPropertyNames(array[slidename]);
var valuesArr = []; var valuesArr = [];
var colorArr = []; var colorArr = [];
...@@ -1910,16 +2366,18 @@ ...@@ -1910,16 +2366,18 @@
} }
}, },
scales: { scales: {
yAxes: [{ xAxes: [{
title: { display: true,
scaleLabel: {
display: true, display: true,
text: 'Your Title Y' labelString: 'Month test example'
} }
}], }],
xAxes: [{ yAxes: [{
title: {
display: true, display: true,
text: 'Your Title X' scaleLabel: {
display: true,
labelString: 'Value test example'
} }
}] }]
} }
...@@ -1928,23 +2386,40 @@ ...@@ -1928,23 +2386,40 @@
if (chart) { if (chart) {
chart.destroy(); chart.destroy();
} }
// console.log("valuesArr")
// console.log(valuesArr)
// console.log("valuesArr")
chart = new Chart(document.getElementById(canvasName), config); chart = new Chart(document.getElementById(canvasName), config);
if (valuesArr.length>0){
$("#" + canvasName).show();
}
return chart; return chart;
} }
var objectChart; var objectChart;
var typeChart; var typeChart;
function showResults(slideNumber) { function showResults(slideNumber) {
if (slideNumber == "all") {
$("#objectChart").hide();
if (objectChart) {
objectChart.destroy();
}
if (typeChart) {
typeChart.destroy();
}
typeChart = drawChart(slideNumber, percentArr2, typeChart, 'typeChart', 'Type Percentage - All')
} else {
$("#objectChart").show()
if (objectChart) { if (objectChart) {
objectChart.destroy(); objectChart.destroy();
} }
objectChart = drawChart(slideNumber, percentArr, objectChart, 'objectChart', 'Object Percentage') objectChart = drawChart(slideNumber, percentArr, objectChart, 'objectChart', 'Object Percentage')
if (typeChart) { if (typeChart) {
typeChart.destroy(); typeChart.destroy();
} }
typeChart = drawChart(slideNumber, percentArr2, typeChart, 'typeChart', 'Type Percentage') typeChart = drawChart(slideNumber, percentArr2, typeChart, 'typeChart', 'Type Percentage')
}
$("#resultChart").show(); $("#resultChart").show();
$("#dropdown").show(); $("#dropdown").show();
$("#details").show(); $("#details").show();
......
...@@ -6,97 +6,96 @@ ...@@ -6,97 +6,96 @@
<script src="https://code.jquery.com/jquery-3.6.0.min.js" <script src="https://code.jquery.com/jquery-3.6.0.min.js"
integrity="sha256-/xUj+3OJU5yExlq6GSYGSHk7tPXikynS7ogEvDej/m4=" crossorigin="anonymous"></script> integrity="sha256-/xUj+3OJU5yExlq6GSYGSHk7tPXikynS7ogEvDej/m4=" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/chart.js@3.7.1/dist/chart.min.js"></script> <script src="https://cdn.jsdelivr.net/npm/chart.js@3.7.1/dist/chart.min.js"></script>
<!-- dropdown hide -->
<script src="https://code.jquery.com/jquery-3.6.0.js"></script> <script src="https://code.jquery.com/jquery-3.6.0.js"></script>
<script src="webgazer_calib.js" type="text/javascript"></script> <script src="webgazertask1.js" type="text/javascript"></script>
<style type="text/css"> <style type="text/css">
body { body {
background-color: rgb(168, 209, 141); background-color: #FFF2CC;
} }
.face { .face {
height: 130px; height: 130px;
position: absolute; position: absolute;
} }
.dropdown { .dropdown {
position: absolute; position: absolute;
display: none; display: none;
width: 200px; width: 200px;
height: 30px; height: 30px;
top: 40%; top: 30%;
left: 25%; left: 25%;
font-size: 17px; font-size: 17px;
background: #f8faf8; background: #f8faf8;
} }
.dropdown-content { .details {
display: none;
position: absolute; position: absolute;
background-color: #f1f1f1; display: none;
min-width: 160px; width: 642px;
box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2); height: 550px;
z-index: 1; top: 45%;
} left: 2%;
.dropdown-content option {
color: black;
padding: 12px 16px;
text-decoration: none;
display: block;
}
.dropdown-content option:hover {
background-color: #ddd;
} }
.dropdown:hover .dropdown-content { img.sgif {
display: block; /* width: 1368px;
height: 766; */
width: 100%;
height: 100%;
object-fit: fill;
} }
.dropdown:hover .dropbtn { img.simg {
background-color: #3e8e41; /* width: 1368px;
height: 766; */
width: 100%;
height: 100%;
object-fit: fill;
} }
</style> </style>
</head> </head>
<body style="margin: 0px; overflow: hidden;"> <body style="margin: 0px; ">
<audio id="backgroundsound" autoplay loop src="audio/background.mp3"> <audio id="backgroundsound" autoplay loop src="audio/background.mp3">
<!-- <source src="audio/background.mp3" type="audio/mpeg"> -->
</audio> </audio>
<img id="ch" class="slide simg" style="display: none;" src="images/task1/CHR.png">
<img id="s1" class="slide simg" style="display: none;" src="images/task1/F1.png">
<img id="s2" class="slide simg" style="display: none;" src="images/task1/F2.png">
<img id="s3" class="slide sgif" style="display: none;" src="images/task1/gif1.gif">
<img id="s4" class="slide simg" style="display: none;" src="images/task1/F3.png">
<img id="s5" class="slide sgif" style="display: none;" src="images/task1/gif2.gif">
<img id="s6" class="slide simg" style="display: none;" src="images/task1/F4R.png">
<img id="s7" class="slide simg" style="display: none;" src="images/task1/F5R.png">
<img id="s8" class="slide simg" style="display: none;" src="images/task1/F6R.png">
<img id="s9" class="slide simg" style="display: none;" src="images/task1/F7R.png">
<img id="s10" class="slide simg" style="display: none;" src="images/task1/F8R.png">
<img id="s11" class="slide simg" style="display: none;" src="images/task1/F9R.png">
<img id="s12" class="slide simg" style="display: none;" src="images/task1/F10R.png">
<img id="s13" class="slide simg" style="display: none;" src="images/task1/F11R.png">
<img id="s14" class="slide simg" style="display: none;" src="images/task1/F12R.png">
<img id="s15" class="slide simg" style="display: none;" src="images/task1/F13R.png">
<img id="s16" class="slide simg" style="display: none;" src="images/task1/F14R.png">
<img id="s17" class="slide simg" style="display: none;" src="images/task1/F15R.png">
<img id="s18" class="slide simg" style="display: none;" src="images/task1/F16R.png">
<img id="s19" class="slide simg" style="display: none;" src="images/task1/F17R.png">
<img id="result" class="slide " style="display: none;" src="images/task1/result1.png">
<img id="details" class="details " style="display: none;" src="images/task1/detail.png">
<img id="ch" class="slide" style="display: none;" src="images/task1/CHR.png">
<img id="s1" class="slide" style="display: none;" src="images/task1/F1.png">
<img id="s2" class="slide" style="display: none;" src="images/task1/F2.png">
<img id="s3" class="slide" style="display: none;" src="images/task1/gif1.gif">
<img id="s4" class="slide" style="display: none;" src="images/task1/F3.png">
<img id="s5" class="slide" style="display: none;" src="images/task1/gif2.gif">
<img id="s6" class="slide" style="display: none;" src="images/task1/F4R.png">
<img id="s7" class="slide" style="display: none;" src="images/task1/F5R.png">
<img id="s8" class="slide" style="display: none;" src="images/task1/F6R.png">
<img id="s9" class="slide" style="display: none;" src="images/task1/F7R.png">
<img id="s10" class="slide" style="display: none;" src="images/task1/F8R.png">
<img id="s11" class="slide" style="display: none;" src="images/task1/F9R.png">
<img id="s12" class="slide" style="display: none;" src="images/task1/F10R.png">
<img id="s13" class="slide" style="display: none;" src="images/task1/F11R.png">
<img id="s14" class="slide" style="display: none;" src="images/task1/F12R.png">
<img id="s15" class="slide" style="display: none;" src="images/task1/F13R.png">
<img id="s16" class="slide" style="display: none;" src="images/task1/F14R.png">
<img id="s17" class="slide" style="display: none;" src="images/task1/F15R.png">
<img id="s18" class="slide" style="display: none;" src="images/task1/F16R.png">
<img id="s19" class="slide" style="display: none;" src="images/task1/F17R.png">
<img id="result" class="slide" style="display: none;" src="images/task1/result1.png">
<div id="resultChart" <div id="resultChart"
style="display: none; position: absolute; top:190px; left:50%; z-index: 9; width: 500px; height: 300px;"> style="display: none; position: absolute; top:190px; left:60%; z-index: 9; width: 800px; height: 400px;">
<canvas id="myChart" width="500px" height="300px"></canvas> <canvas id="objectChart" width="500px" height="300px"></canvas>
<canvas id="typeChart" width="500px" height="300px"></canvas>
</div> </div>
<!-- dropdown --> <!-- dropdown for 1st bar chart-->
<div>
<div >
<select id="slideList" class="dropdown" onchange="slideChange()"> <select id="slideList" class="dropdown" onchange="slideChange()">
<option value="none" selected disabled hidden>Select a Slide</option> <option value="none" selected disabled hidden>Select Slide</option>
<option value="1">Slide 1</option> <option value="1">Slide 1</option>
<option value="2">Slide 2</option> <option value="2">Slide 2</option>
<option value="3">Slide 3</option> <option value="3">Slide 3</option>
...@@ -116,21 +115,18 @@ ...@@ -116,21 +115,18 @@
<option value="17">Slide 17</option> <option value="17">Slide 17</option>
<option value="18">Slide 18</option> <option value="18">Slide 18</option>
<option value="19">Slide 19</option> <option value="19">Slide 19</option>
<option value="all">All Slide</option>
</select> </select>
</div> </div>
<div id="message"></div>
<script type="text/javascript"> <script type="text/javascript">
function slideChange() { function slideChange() {
var slideNumber = document.getElementById("slideList").value; var slideNumber = document.getElementById("slideList").value;
showResults(slideNumber); showResults(slideNumber);
} }
sessionStorage.setItem("task_name", "task1"); sessionStorage.setItem("task_name", "task2");
boundaryArr = { boundaryArr = {
"s1": { "s1": {
...@@ -266,7 +262,7 @@ ...@@ -266,7 +262,7 @@
}, },
"F6I3": { "F6I3": {
"name": "hat", "name": "hat",
"type": "I", "type": "L",
"top": 403, "top": 403,
"bottom": 678, "bottom": 678,
"left": 560, "left": 560,
...@@ -292,7 +288,7 @@ ...@@ -292,7 +288,7 @@
}, },
"F7I3": { "F7I3": {
"name": "hat", "name": "hat",
"type": "I", "type": "L",
"top": 109, "top": 109,
"bottom": 355, "bottom": 355,
"left": 217, "left": 217,
...@@ -863,31 +859,51 @@ ...@@ -863,31 +859,51 @@
}, },
}; };
// $(document).ready(function (){
// document.documentElement.requestFullscreen();
// })
// <!-- start webgazer --> // <!-- start webgazer -->
var startTime = 0;
var pausedTime = 0;
var resumeTime = 0;
var arr = {}; var arr = {};
var percentArr = {} var percentArr = {}
var percentArr2 = {}
var slideID = null; var slideID = null;
var slide = "ch"; var slide = "ch";
//pause variable(use to store the stste of game) //pause variable(use to store the stste of game)
var isGameOver = false; var isGameOver = false;
var a var slideNumber
var started = false; var started = false;
var taskLoop; var taskLoop;
var taskPaused = false; var taskPaused = false;
var x_center = window.innerWidth / 2;
var y_center = window.innerHeight / 2;
console.log("3333333333333333333333333333333333333333333");
console.log(x_center);
console.log(y_center);
console.log("3333333333333333333333333333333333333333333");
webgazer.setGazeListener(function (data, elapsedTime) { webgazer.setGazeListener(function (data, elapsedTime) {
if (data == null) { if (data == null) {
return; return;
} }
if(!started){ if (!started) {
showSlide(); showSlide();
taskLoop = setInterval(showSlide, 7000); taskLoop = setInterval(showSlide, 9000);
started = true; started = true;
//time stamp converter
if (startTime == 0) {
startTime = Date.now()
console.log("startTime1");
console.log(startTime);
console.log("startTime1");
}else{
}
} }
var xprediction = data.x; //these x coordinates are relative to the viewport var xprediction = data.x; //these x coordinates are relative to the viewport
...@@ -903,7 +919,10 @@ ...@@ -903,7 +919,10 @@
if (arr[slide] == undefined) { if (arr[slide] == undefined) {
arr[slide] = []; arr[slide] = [];
} }
arr[slide].push({ arr[slide].push({
"timestamp": (Date.now() - startTime)/1000,
//"timestamp": Date.now(),
"x": xprediction, "x": xprediction,
"y": yprediction, "y": yprediction,
"bb": gazeObject.name, "bb": gazeObject.name,
...@@ -914,6 +933,10 @@ ...@@ -914,6 +933,10 @@
}).begin(); }).begin();
function scaleCoordinates(val){
factor = window.innerWidth / 1366;
return val * factor;
}
function printPred() { function printPred() {
var prediction = webgazer.getCurrentPrediction(); var prediction = webgazer.getCurrentPrediction();
...@@ -925,33 +948,45 @@ ...@@ -925,33 +948,45 @@
} }
function getGazeObject(slide, xcoordinate, ycoordinate) { function getGazeObject(slide, xcoordinate, ycoordinate) {
//cootima bounding box eke condition eka mulinma liyanna one
//condition for object1
// if () object1.left < xcoordinate < object1.right && object1.top < ycoordinate < object1.bottom ) then return object1
// console.log("object1")
// console.log(object1)
// console.log("/object1")
//final condition set
//slide1
if (slide == "s1") { if (slide == "s1") {
object1 = boundaryArr[slide]["F1I1"] object1 = boundaryArr[slide]["F1I1"]
if (((object1.left < xcoordinate) && (xcoordinate < object1.right)) && ((object1.top < ycoordinate) && (ycoordinate < object1.bottom))) { if (((scaleCoordinates(object1.left) < xcoordinate) && (xcoordinate < scaleCoordinates(object1.right))) && ((scaleCoordinates(object1.top) < ycoordinate) && (ycoordinate < scaleCoordinates(object1.bottom)))) {
return { return {
"name": object1.name, "name": object1.name,
"type": object1.type, "type": object1.type,
} }
} }
if ((xcoordinate < x_center) && (ycoordinate < y_center)) {
return {
"name": "topleft",
"type": "none"
}
}
if ((xcoordinate > x_center) && (ycoordinate < y_center)) {
return {
"name": "topright",
"type": "none"
}
}
if ((xcoordinate < x_center) && (ycoordinate > y_center)) {
return {
"name": "bottomleft",
"type": "none"
}
}
if ((xcoordinate > x_center) && (ycoordinate > y_center)) {
return { return {
"name": "none", "name": "bottomright",
"type": "none" "type": "none"
} }
} }
}
//slide2 //slide2
if (slide == "s2") { if (slide == "s2") {
object2 = boundaryArr[slide]["F2I1"] object2 = boundaryArr[slide]["F2I1"]
if (((object2.left < xcoordinate) && (xcoordinate < object2.right)) && ((object2.top < ycoordinate) && (ycoordinate < object2.bottom))) { if (((scaleCoordinates(object2.left) < xcoordinate) && (xcoordinate < scaleCoordinates(object2.right))) && ((scaleCoordinates(object2.top) < ycoordinate) && (ycoordinate < scaleCoordinates(object2.bottom)))) {
return { return {
"name": object2.name, "name": object2.name,
"type": object2.type, "type": object2.type,
...@@ -959,7 +994,7 @@ ...@@ -959,7 +994,7 @@
} }
object3 = boundaryArr[slide]["F2I2"] object3 = boundaryArr[slide]["F2I2"]
if (((object3.left < xcoordinate) && (xcoordinate < object3.right)) && ((object3.top < ycoordinate) && (ycoordinate < object3.bottom))) { if (((scaleCoordinates(object3.left) < xcoordinate) && (xcoordinate < scaleCoordinates(object3.right))) && ((scaleCoordinates(object3.top) < ycoordinate) && (ycoordinate < scaleCoordinates(object3.bottom)))) {
return { return {
"name": object3.name, "name": object3.name,
"type": object3.type, "type": object3.type,
...@@ -967,58 +1002,98 @@ ...@@ -967,58 +1002,98 @@
} }
object4 = boundaryArr[slide]["F2I3"] object4 = boundaryArr[slide]["F2I3"]
if (((object4.left < xcoordinate) && (xcoordinate < object4.right)) && ((object4.top < ycoordinate) && (ycoordinate < object4.bottom))) { if (((scaleCoordinates(object4.left) < xcoordinate) && (xcoordinate < scaleCoordinates(object4.right))) && ((scaleCoordinates(object4.top) < ycoordinate) && (ycoordinate < scaleCoordinates(object4.bottom)))) {
return { return {
"name": object4.name, "name": object4.name,
"type": object4.type, "type": object4.type,
} }
} }
if ((xcoordinate < x_center) && (ycoordinate < y_center)) {
return {
"name": "topleft",
"type": "none"
}
}
if ((xcoordinate > x_center) && (ycoordinate < y_center)) {
return { return {
"name": "none", "name": "topright",
"type": "none" "type": "none"
} }
} }
if ((xcoordinate < x_center) && (ycoordinate > y_center)) {
return {
"name": "bottomleft",
"type": "none"
}
}
if ((xcoordinate > x_center) && (ycoordinate > y_center)) {
return {
"name": "bottomright",
"type": "none"
}
}
}
//slide3 //slide3
if (slide == "s3") { if (slide == "s3") {
object5 = boundaryArr[slide]["F3I1"] object5 = boundaryArr[slide]["F3I1"]
if (((object5.left < xcoordinate) && (xcoordinate < object5.right)) && ((object5.top < ycoordinate) && (ycoordinate < object5.bottom))) { if (((scaleCoordinates(object5.left) < xcoordinate) && (xcoordinate < scaleCoordinates(object5.right))) && ((scaleCoordinates(object5.top) < ycoordinate) && (ycoordinate < scaleCoordinates(object5.bottom)))) {
return { return {
"name": object5.name, "name": object5.name,
"type": object5.type, "type": object5.type,
} }
} }
object6 = boundaryArr[slide]["F3I2"] object6 = boundaryArr[slide]["F3I2"]
if (((object6.left < xcoordinate) && (xcoordinate < object6.right)) && ((object6.top < ycoordinate) && (ycoordinate < object6.bottom))) { if (((scaleCoordinates(object6.left) < xcoordinate) && (xcoordinate < scaleCoordinates(object6.right))) && ((scaleCoordinates(object6.top) < ycoordinate) && (ycoordinate < scaleCoordinates(object6.bottom)))) {
return { return {
"name": object6.name, "name": object6.name,
"type": object6.type, "type": object6.type,
} }
} }
object7 = boundaryArr[slide]["F3I3"] object7 = boundaryArr[slide]["F3I3"]
if (((object7.left < xcoordinate) && (xcoordinate < object7.right)) && ((object7.top < ycoordinate) && (ycoordinate < object7.bottom))) { if (((scaleCoordinates(object7.left) < xcoordinate) && (xcoordinate < scaleCoordinates(object7.right))) && ((scaleCoordinates(object7.top) < ycoordinate) && (ycoordinate < scaleCoordinates(object7.bottom)))) {
return { return {
"name": object7.name, "name": object7.name,
"type": object7.type, "type": object7.type,
} }
} }
if ((xcoordinate < x_center) && (ycoordinate < y_center)) {
return {
"name": "topleft",
"type": "none"
}
}
if ((xcoordinate > x_center) && (ycoordinate < y_center)) {
return {
"name": "topright",
"type": "none"
}
}
if ((xcoordinate < x_center) && (ycoordinate > y_center)) {
return {
"name": "bottomleft",
"type": "none"
}
}
if ((xcoordinate > x_center) && (ycoordinate > y_center)) {
return { return {
"name": "none", "name": "bottomright",
"type": "none" "type": "none"
} }
} }
}
//slide4 //slide4
if (slide == "s4") { if (slide == "s4") {
object9 = boundaryArr[slide]["F4I2"] object9 = boundaryArr[slide]["F4I2"]
if (((object9.left < xcoordinate) && (xcoordinate < object9.right)) && ((object9.top < ycoordinate) && (ycoordinate < object9.bottom))) { if (((scaleCoordinates(object9.left) < xcoordinate) && (xcoordinate < scaleCoordinates(object9.right))) && ((scaleCoordinates(object9.top) < ycoordinate) && (ycoordinate < scaleCoordinates(object9.bottom)))) {
return { return {
"name": object9.name, "name": object9.name,
"type": object9.type, "type": object9.type,
} }
} }
object10 = boundaryArr[slide]["F4I3"] object10 = boundaryArr[slide]["F4I3"]
if (((object10.left < xcoordinate) && (xcoordinate < object10.right)) && ((object10.top < ycoordinate) && (ycoordinate < object10.bottom))) { if (((scaleCoordinates(object10.left) < xcoordinate) && (xcoordinate < scaleCoordinates(object10.right))) && ((scaleCoordinates(object10.top) < ycoordinate) && (ycoordinate < scaleCoordinates(object10.bottom)))) {
return { return {
"name": object10.name, "name": object10.name,
"type": object10.type, "type": object10.type,
...@@ -1026,29 +1101,49 @@ ...@@ -1026,29 +1101,49 @@
} }
object8 = boundaryArr[slide]["F4I1"] object8 = boundaryArr[slide]["F4I1"]
if (((object8.left < xcoordinate) && (xcoordinate < object8.right)) && ((object8.top < ycoordinate) && (ycoordinate < object8.bottom))) { if (((scaleCoordinates(object8.left) < xcoordinate) && (xcoordinate < scaleCoordinates(object8.right))) && ((scaleCoordinates(object8.top) < ycoordinate) && (ycoordinate < scaleCoordinates(object8.bottom)))) {
return { return {
"name": object8.name, "name": object8.name,
"type": object8.type, "type": object8.type,
} }
} }
if ((xcoordinate < x_center) && (ycoordinate < y_center)) {
return {
"name": "topleft",
"type": "none"
}
}
if ((xcoordinate > x_center) && (ycoordinate < y_center)) {
return {
"name": "topright",
"type": "none"
}
}
if ((xcoordinate < x_center) && (ycoordinate > y_center)) {
return { return {
"name": "none", "name": "bottomleft",
"type": "none" "type": "none"
} }
} }
if ((xcoordinate > x_center) && (ycoordinate > y_center)) {
return {
"name": "bottomright",
"type": "none"
}
}
}
//slide5 //slide5
if (slide == "s5") { if (slide == "s5") {
object12 = boundaryArr[slide]["F5I2"] object12 = boundaryArr[slide]["F5I2"]
if (((object12.left < xcoordinate) && (xcoordinate < object12.right)) && ((object12.top < ycoordinate) && (ycoordinate < object12.bottom))) { if (((scaleCoordinates(object12.left) < xcoordinate) && (xcoordinate < scaleCoordinates(object12.right))) && ((scaleCoordinates(object12.top) < ycoordinate) && (ycoordinate < scaleCoordinates(object12.bottom)))) {
return { return {
"name": object12.name, "name": object12.name,
"type": object12.type, "type": object12.type,
} }
} }
object13 = boundaryArr[slide]["F5I3"] object13 = boundaryArr[slide]["F5I3"]
if (((object13.left < xcoordinate) && (xcoordinate < object13.right)) && ((object13.top < ycoordinate) && (ycoordinate < object13.bottom))) { if (((scaleCoordinates(object13.left) < xcoordinate) && (xcoordinate < scaleCoordinates(object13.right))) && ((scaleCoordinates(object13.top) < ycoordinate) && (ycoordinate < scaleCoordinates(object13.bottom)))) {
return { return {
"name": object13.name, "name": object13.name,
"type": object13.type, "type": object13.type,
...@@ -1056,82 +1151,142 @@ ...@@ -1056,82 +1151,142 @@
} }
object11 = boundaryArr[slide]["F5I1"] object11 = boundaryArr[slide]["F5I1"]
if (((object11.left < xcoordinate) && (xcoordinate < object11.right)) && ((object11.top < ycoordinate) && (ycoordinate < object11.bottom))) { if (((scaleCoordinates(object11.left) < xcoordinate) && (xcoordinate < scaleCoordinates(object11.right))) && ((scaleCoordinates(object11.top) < ycoordinate) && (ycoordinate < scaleCoordinates(object11.bottom)))) {
return { return {
"name": object11.name, "name": object11.name,
"type": object11.type, "type": object11.type,
} }
} }
if ((xcoordinate < x_center) && (ycoordinate < y_center)) {
return {
"name": "topleft",
"type": "none"
}
}
if ((xcoordinate > x_center) && (ycoordinate < y_center)) {
return {
"name": "topright",
"type": "none"
}
}
if ((xcoordinate < x_center) && (ycoordinate > y_center)) {
return { return {
"name": "none", "name": "bottomleft",
"type": "none" "type": "none"
} }
} }
if ((xcoordinate > x_center) && (ycoordinate > y_center)) {
return {
"name": "bottomright",
"type": "none"
}
}
}
//slide6 //slide6
if (slide == "s6") { if (slide == "s6") {
object14 = boundaryArr[slide]["F6I1"] object14 = boundaryArr[slide]["F6I1"]
if (((object14.left < xcoordinate) && (xcoordinate < object14.right)) && ((object14.top < ycoordinate) && (ycoordinate < object14.bottom))) { if (((scaleCoordinates(object14.left) < xcoordinate) && (xcoordinate < scaleCoordinates(object14.right))) && ((scaleCoordinates(object14.top) < ycoordinate) && (ycoordinate < scaleCoordinates(object14.bottom)))) {
return { return {
"name": object14.name, "name": object14.name,
"type": object14.type, "type": object14.type,
} }
} }
object15 = boundaryArr[slide]["F6I2"] object15 = boundaryArr[slide]["F6I2"]
if (((object15.left < xcoordinate) && (xcoordinate < object15.right)) && ((object15.top < ycoordinate) && (ycoordinate < object15.bottom))) { if (((scaleCoordinates(object15.left) < xcoordinate) && (xcoordinate < scaleCoordinates(object15.right))) && ((scaleCoordinates(object15.top) < ycoordinate) && (ycoordinate < scaleCoordinates(object15.bottom)))) {
return { return {
"name": object15.name, "name": object15.name,
"type": object15.type, "type": object15.type,
} }
} }
object16 = boundaryArr[slide]["F6I3"] object16 = boundaryArr[slide]["F6I3"]
if (((object16.left < xcoordinate) && (xcoordinate < object16.right)) && ((object16.top < ycoordinate) && (ycoordinate < object16.bottom))) { if (((scaleCoordinates(object16.left) < xcoordinate) && (xcoordinate < scaleCoordinates(object16.right))) && ((scaleCoordinates(object16.top) < ycoordinate) && (ycoordinate < scaleCoordinates(object16.bottom)))) {
return { return {
"name": object16.name, "name": object16.name,
"type": object16.type, "type": object16.type,
} }
} }
if ((xcoordinate < x_center) && (ycoordinate < y_center)) {
return { return {
"name": "none", "name": "topleft",
"type": "none" "type": "none"
} }
} }
if ((xcoordinate > x_center) && (ycoordinate < y_center)) {
return {
"name": "topright",
"type": "none"
}
}
if ((xcoordinate < x_center) && (ycoordinate > y_center)) {
return {
"name": "bottomleft",
"type": "none"
}
}
if ((xcoordinate > x_center) && (ycoordinate > y_center)) {
return {
"name": "bottomright",
"type": "none"
}
}
}
//slide7 //slide7
if (slide == "s7") { if (slide == "s7") {
object17 = boundaryArr[slide]["F7I1"] object17 = boundaryArr[slide]["F7I1"]
if (((object17.left < xcoordinate) && (xcoordinate < object17.right)) && ((object17.top < ycoordinate) && (ycoordinate < object17.bottom))) { if (((scaleCoordinates(object17.left) < xcoordinate) && (xcoordinate < scaleCoordinates(object17.right))) && ((scaleCoordinates(object17.top) < ycoordinate) && (ycoordinate < scaleCoordinates(object17.bottom)))) {
return { return {
"name": object17.name, "name": object17.name,
"type": object17.type, "type": object17.type,
} }
} }
object18 = boundaryArr[slide]["F7I2"] object18 = boundaryArr[slide]["F7I2"]
if (((object18.left < xcoordinate) && (xcoordinate < object18.right)) && ((object18.top < ycoordinate) && (ycoordinate < object18.bottom))) { if (((scaleCoordinates(object18.left) < xcoordinate) && (xcoordinate < scaleCoordinates(object18.right))) && ((scaleCoordinates(object18.top) < ycoordinate) && (ycoordinate < scaleCoordinates(object18.bottom)))) {
return { return {
"name": object18.name, "name": object18.name,
"type": object18.type, "type": object18.type,
} }
} }
object19 = boundaryArr[slide]["F7I3"] object19 = boundaryArr[slide]["F7I3"]
if (((object19.left < xcoordinate) && (xcoordinate < object19.right)) && ((object19.top < ycoordinate) && (ycoordinate < object19.bottom))) { if (((scaleCoordinates(object19.left) < xcoordinate) && (xcoordinate < scaleCoordinates(object19.right))) && ((scaleCoordinates(object19.top) < ycoordinate) && (ycoordinate < scaleCoordinates(object19.bottom)))) {
return { return {
"name": object19.name, "name": object19.name,
"type": object19.type, "type": object19.type,
} }
} }
if ((xcoordinate < x_center) && (ycoordinate < y_center)) {
return { return {
"name": "none", "name": "topleft",
"type": "none" "type": "none"
} }
} }
if ((xcoordinate > x_center) && (ycoordinate < y_center)) {
return {
"name": "topright",
"type": "none"
}
}
if ((xcoordinate < x_center) && (ycoordinate > y_center)) {
return {
"name": "bottomleft",
"type": "none"
}
}
if ((xcoordinate > x_center) && (ycoordinate > y_center)) {
return {
"name": "bottomright",
"type": "none"
}
}
}
//slide8 //slide8
if (slide == "s8") { if (slide == "s8") {
object20 = boundaryArr[slide]["F8I1"] object20 = boundaryArr[slide]["F8I1"]
if (((object20.left < xcoordinate) && (xcoordinate < object20.right)) && ((object20.top < ycoordinate) && (ycoordinate < object20.bottom))) { if (((scaleCoordinates(object20.left) < xcoordinate) && (xcoordinate < scaleCoordinates(object20.right))) && ((scaleCoordinates(object20.top) < ycoordinate) && (ycoordinate < scaleCoordinates(object20.bottom)))) {
return { return {
"name": object20.name, "name": object20.name,
"type": object20.type, "type": object20.type,
...@@ -1139,38 +1294,58 @@ ...@@ -1139,38 +1294,58 @@
} }
object21 = boundaryArr[slide]["F8I2"] object21 = boundaryArr[slide]["F8I2"]
if (((object21.left < xcoordinate) && (xcoordinate < object21.right)) && ((object21.top < ycoordinate) && (ycoordinate < object21.bottom))) { if (((scaleCoordinates(object21.left) < xcoordinate) && (xcoordinate < scaleCoordinates(object21.right))) && ((scaleCoordinates(object21.top) < ycoordinate) && (ycoordinate < scaleCoordinates(object21.bottom)))) {
return { return {
"name": object21.name, "name": object21.name,
"type": object21.type, "type": object21.type,
} }
} }
object22 = boundaryArr[slide]["F8I3"] object22 = boundaryArr[slide]["F8I3"]
if (((object22.left < xcoordinate) && (xcoordinate < object22.right)) && ((object22.top < ycoordinate) && (ycoordinate < object22.bottom))) { if (((scaleCoordinates(object22.left) < xcoordinate) && (xcoordinate < scaleCoordinates(object22.right))) && ((scaleCoordinates(object22.top) < ycoordinate) && (ycoordinate < scaleCoordinates(object22.bottom)))) {
return { return {
"name": object22.name, "name": object22.name,
"type": object22.type, "type": object22.type,
} }
} }
object23 = boundaryArr[slide]["F8I4"] object23 = boundaryArr[slide]["F8I4"]
if (((object23.left < xcoordinate) && (xcoordinate < object23.right)) && ((object23.top < ycoordinate) && (ycoordinate < object23.bottom))) { if (((scaleCoordinates(object23.left) < xcoordinate) && (xcoordinate < scaleCoordinates(object23.right))) && ((scaleCoordinates(object23.top) < ycoordinate) && (ycoordinate < scaleCoordinates(object23.bottom)))) {
return { return {
"name": object23.name, "name": object23.name,
"type": object23.type, "type": object23.type,
} }
} }
if ((xcoordinate < x_center) && (ycoordinate < y_center)) {
return {
"name": "topleft",
"type": "none"
}
}
if ((xcoordinate > x_center) && (ycoordinate < y_center)) {
return { return {
"name": "none", "name": "topright",
"type": "none" "type": "none"
} }
} }
if ((xcoordinate < x_center) && (ycoordinate > y_center)) {
return {
"name": "bottomleft",
"type": "none"
}
}
if ((xcoordinate > x_center) && (ycoordinate > y_center)) {
return {
"name": "bottomright",
"type": "none"
}
}
}
//slide9 //slide9
if (slide == "s9") { if (slide == "s9") {
object24 = boundaryArr[slide]["F9I1"] object24 = boundaryArr[slide]["F9I1"]
if (((object24.left < xcoordinate) && (xcoordinate < object24.right)) && ((object24.top < ycoordinate) && (ycoordinate < object24.bottom))) { if (((scaleCoordinates(object24.left) < xcoordinate) && (xcoordinate < scaleCoordinates(object24.right))) && ((scaleCoordinates(object24.top) < ycoordinate) && (ycoordinate < scaleCoordinates(object24.bottom)))) {
return { return {
"name": object24.name, "name": object24.name,
"type": object24.type, "type": object24.type,
...@@ -1178,37 +1353,57 @@ ...@@ -1178,37 +1353,57 @@
} }
object25 = boundaryArr[slide]["F9I2"] object25 = boundaryArr[slide]["F9I2"]
if (((object25.left < xcoordinate) && (xcoordinate < object25.right)) && ((object25.top < ycoordinate) && (ycoordinate < object25.bottom))) { if (((scaleCoordinates(object25.left) < xcoordinate) && (xcoordinate < scaleCoordinates(object25.right))) && ((scaleCoordinates(object25.top) < ycoordinate) && (ycoordinate < scaleCoordinates(object25.bottom)))) {
return { return {
"name": object25.name, "name": object25.name,
"type": object25.type, "type": object25.type,
} }
} }
object26 = boundaryArr[slide]["F9I3"] object26 = boundaryArr[slide]["F9I3"]
if (((object26.left < xcoordinate) && (xcoordinate < object26.right)) && ((object26.top < ycoordinate) && (ycoordinate < object26.bottom))) { if (((scaleCoordinates(object26.left) < xcoordinate) && (xcoordinate < scaleCoordinates(object26.right))) && ((scaleCoordinates(object26.top) < ycoordinate) && (ycoordinate < scaleCoordinates(object26.bottom)))) {
return { return {
"name": object26.name, "name": object26.name,
"type": object26.type, "type": object26.type,
} }
} }
object27 = boundaryArr[slide]["F9I4"] object27 = boundaryArr[slide]["F9I4"]
if (((object27.left < xcoordinate) && (xcoordinate < object27.right)) && ((object27.top < ycoordinate) && (ycoordinate < object27.bottom))) { if (((scaleCoordinates(object27.left) < xcoordinate) && (xcoordinate < scaleCoordinates(object27.right))) && ((scaleCoordinates(object27.top) < ycoordinate) && (ycoordinate < scaleCoordinates(object27.bottom)))) {
return { return {
"name": object27.name, "name": object27.name,
"type": object27.type, "type": object27.type,
} }
} }
if ((xcoordinate < x_center) && (ycoordinate < y_center)) {
return {
"name": "topleft",
"type": "none"
}
}
if ((xcoordinate > x_center) && (ycoordinate < y_center)) {
return { return {
"name": "none", "name": "topright",
"type": "none" "type": "none"
} }
} }
if ((xcoordinate < x_center) && (ycoordinate > y_center)) {
return {
"name": "bottomleft",
"type": "none"
}
}
if ((xcoordinate > x_center) && (ycoordinate > y_center)) {
return {
"name": "bottomright",
"type": "none"
}
}
}
//slide10 //slide10
if (slide == "s10") { if (slide == "s10") {
object28 = boundaryArr[slide]["F10I1"] object28 = boundaryArr[slide]["F10I1"]
if (((object28.left < xcoordinate) && (xcoordinate < object28.right)) && ((object28.top < ycoordinate) && (ycoordinate < object28.bottom))) { if (((scaleCoordinates(object28.left) < xcoordinate) && (xcoordinate < scaleCoordinates(object28.right))) && ((scaleCoordinates(object28.top) < ycoordinate) && (ycoordinate < scaleCoordinates(object28.bottom)))) {
return { return {
"name": object28.name, "name": object28.name,
"type": object28.type, "type": object28.type,
...@@ -1216,7 +1411,7 @@ ...@@ -1216,7 +1411,7 @@
} }
object29 = boundaryArr[slide]["F10I2"] object29 = boundaryArr[slide]["F10I2"]
if (((object29.left < xcoordinate) && (xcoordinate < object29.right)) && ((object29.top < ycoordinate) && (ycoordinate < object29.bottom))) { if (((scaleCoordinates(object29.left) < xcoordinate) && (xcoordinate < scaleCoordinates(object29.right))) && ((scaleCoordinates(object29.top) < ycoordinate) && (ycoordinate < scaleCoordinates(object29.bottom)))) {
return { return {
"name": object29.name, "name": object29.name,
"type": object29.type, "type": object29.type,
...@@ -1224,500 +1419,700 @@ ...@@ -1224,500 +1419,700 @@
} }
object30 = boundaryArr[slide]["F10I3"] object30 = boundaryArr[slide]["F10I3"]
if (((object30.left < xcoordinate) && (xcoordinate < object30.right)) && ((object30.top < ycoordinate) && (ycoordinate < object30.bottom))) { if (((scaleCoordinates(object30.left) < xcoordinate) && (xcoordinate < scaleCoordinates(object30.right))) && ((scaleCoordinates(object30.top) < ycoordinate) && (ycoordinate < scaleCoordinates(object30.bottom)))) {
return { return {
"name": object30.name, "name": object30.name,
"type": object30.type, "type": object30.type,
} }
} }
object31 = boundaryArr[slide]["F10I4"] object31 = boundaryArr[slide]["F10I4"]
if (((object31.left < xcoordinate) && (xcoordinate < object31.right)) && ((object31.top < ycoordinate) && (ycoordinate < object31.bottom))) { if (((scaleCoordinates(object31.left) < xcoordinate) && (xcoordinate < scaleCoordinates(object31.right))) && ((scaleCoordinates(object31.top) < ycoordinate) && (ycoordinate < scaleCoordinates(object31.bottom)))) {
return { return {
"name": object31.name, "name": object31.name,
"type": object31.type, "type": object31.type,
} }
} }
object32 = boundaryArr[slide]["F10I5"] object32 = boundaryArr[slide]["F10I5"]
if (((object32.left < xcoordinate) && (xcoordinate < object32.right)) && ((object32.top < ycoordinate) && (ycoordinate < object32.bottom))) { if (((scaleCoordinates(object32.left) < xcoordinate) && (xcoordinate < scaleCoordinates(object32.right))) && ((scaleCoordinates(object32.top) < ycoordinate) && (ycoordinate < scaleCoordinates(object32.bottom)))) {
return { return {
"name": object32.name, "name": object32.name,
"type": object32.type, "type": object32.type,
} }
} }
if ((xcoordinate < x_center) && (ycoordinate < y_center)) {
return {
"name": "topleft",
"type": "none"
}
}
if ((xcoordinate > x_center) && (ycoordinate < y_center)) {
return {
"name": "topright",
"type": "none"
}
}
if ((xcoordinate < x_center) && (ycoordinate > y_center)) {
return {
"name": "bottomleft",
"type": "none"
}
}
if ((xcoordinate > x_center) && (ycoordinate > y_center)) {
return { return {
"name": "none", "name": "bottomright",
"type": "none" "type": "none"
} }
} }
}
//slide11 //slide11
if (slide == "s11") { if (slide == "s11") {
object33 = boundaryArr[slide]["F11I1"] object33 = boundaryArr[slide]["F11I1"]
if (((object33.left < xcoordinate) && (xcoordinate < object33.right)) && ((object33.top < ycoordinate) && (ycoordinate < object33.bottom))) { if (((scaleCoordinates(object33.left) < xcoordinate) && (xcoordinate < scaleCoordinates(object33.right))) && ((scaleCoordinates(object33.top) < ycoordinate) && (ycoordinate < scaleCoordinates(object33.bottom)))) {
return { return {
"name": object33.name, "name": object33.name,
"type": object33.type, "type": object33.type,
} }
} }
object34 = boundaryArr[slide]["F11I2"] object34 = boundaryArr[slide]["F11I2"]
if (((object34.left < xcoordinate) && (xcoordinate < object34.right)) && ((object34.top < ycoordinate) && (ycoordinate < object34.bottom))) { if (((scaleCoordinates(object34.left) < xcoordinate) && (xcoordinate < scaleCoordinates(object34.right))) && ((scaleCoordinates(object34.top) < ycoordinate) && (ycoordinate < scaleCoordinates(object34.bottom)))) {
return { return {
"name": object34.name, "name": object34.name,
"type": object34.type, "type": object34.type,
} }
} }
object35 = boundaryArr[slide]["F11I3"] object35 = boundaryArr[slide]["F11I3"]
if (((object35.left < xcoordinate) && (xcoordinate < object35.right)) && ((object35.top < ycoordinate) && (ycoordinate < object35.bottom))) { if (((scaleCoordinates(object35.left) < xcoordinate) && (xcoordinate < scaleCoordinates(object35.right))) && ((scaleCoordinates(object35.top) < ycoordinate) && (ycoordinate < scaleCoordinates(object35.bottom)))) {
return { return {
"name": object35.name, "name": object35.name,
"type": object35.type, "type": object35.type,
} }
} }
object36 = boundaryArr[slide]["F11I4"] object36 = boundaryArr[slide]["F11I4"]
if (((object36.left < xcoordinate) && (xcoordinate < object36.right)) && ((object36.top < ycoordinate) && (ycoordinate < object36.bottom))) { if (((scaleCoordinates(object36.left) < xcoordinate) && (xcoordinate < scaleCoordinates(object36.right))) && ((scaleCoordinates(object36.top) < ycoordinate) && (ycoordinate < scaleCoordinates(object36.bottom)))) {
return { return {
"name": object36.name, "name": object36.name,
"type": object36.type, "type": object36.type,
} }
} }
object37 = boundaryArr[slide]["F11I5"] object37 = boundaryArr[slide]["F11I5"]
if (((object37.left < xcoordinate) && (xcoordinate < object37.right)) && ((object37.top < ycoordinate) && (ycoordinate < object37.bottom))) { if (((scaleCoordinates(object37.left) < xcoordinate) && (xcoordinate < scaleCoordinates(object37.right))) && ((scaleCoordinates(object37.top) < ycoordinate) && (ycoordinate < scaleCoordinates(object37.bottom)))) {
return { return {
"name": object37.name, "name": object37.name,
"type": object37.type, "type": object37.type,
} }
} }
object38 = boundaryArr[slide]["F11I6"] object38 = boundaryArr[slide]["F11I6"]
if (((object38.left < xcoordinate) && (xcoordinate < object38.right)) && ((object38.top < ycoordinate) && (ycoordinate < object38.bottom))) { if (((scaleCoordinates(object38.left) < xcoordinate) && (xcoordinate < scaleCoordinates(object38.right))) && ((scaleCoordinates(object38.top) < ycoordinate) && (ycoordinate < scaleCoordinates(object38.bottom)))) {
return { return {
"name": object38.name, "name": object38.name,
"type": object38.type, "type": object38.type,
} }
} }
if ((xcoordinate < x_center) && (ycoordinate < y_center)) {
return {
"name": "topleft",
"type": "none"
}
}
if ((xcoordinate > x_center) && (ycoordinate < y_center)) {
return {
"name": "topright",
"type": "none"
}
}
if ((xcoordinate < x_center) && (ycoordinate > y_center)) {
return { return {
"name": "none", "name": "bottomleft",
"type": "none" "type": "none"
} }
} }
if ((xcoordinate > x_center) && (ycoordinate > y_center)) {
return {
"name": "bottomright",
"type": "none"
}
}
}
//slide12 //slide12
if (slide == "s12") { if (slide == "s12") {
object39 = boundaryArr[slide]["F12I1"] object39 = boundaryArr[slide]["F12I1"]
if (((object39.left < xcoordinate) && (xcoordinate < object39.right)) && ((object39.top < ycoordinate) && (ycoordinate < object39.bottom))) { if (((scaleCoordinates(object39.left) < xcoordinate) && (xcoordinate < scaleCoordinates(object39.right))) && ((scaleCoordinates(object39.top) < ycoordinate) && (ycoordinate < scaleCoordinates(object39.bottom)))) {
return { return {
"name": object39.name, "name": object39.name,
"type": object39.type, "type": object39.type,
} }
} }
object40 = boundaryArr[slide]["F12I2"] object40 = boundaryArr[slide]["F12I2"]
if (((object40.left < xcoordinate) && (xcoordinate < object40.right)) && ((object40.top < ycoordinate) && (ycoordinate < object40.bottom))) { if (((scaleCoordinates(object40.left) < xcoordinate) && (xcoordinate < scaleCoordinates(object40.right))) && ((scaleCoordinates(object40.top) < ycoordinate) && (ycoordinate < scaleCoordinates(object40.bottom)))) {
return { return {
"name": object40.name, "name": object40.name,
"type": object40.type, "type": object40.type,
} }
} }
object41 = boundaryArr[slide]["F12I3"] object41 = boundaryArr[slide]["F12I3"]
if (((object41.left < xcoordinate) && (xcoordinate < object41.right)) && ((object41.top < ycoordinate) && (ycoordinate < object41.bottom))) { if (((scaleCoordinates(object41.left) < xcoordinate) && (xcoordinate < scaleCoordinates(object41.right))) && ((scaleCoordinates(object41.top) < ycoordinate) && (ycoordinate < scaleCoordinates(object41.bottom)))) {
return { return {
"name": object41.name, "name": object41.name,
"type": object41.type, "type": object41.type,
} }
} }
object42 = boundaryArr[slide]["F12I4"] object42 = boundaryArr[slide]["F12I4"]
if (((object42.left < xcoordinate) && (xcoordinate < object42.right)) && ((object42.top < ycoordinate) && (ycoordinate < object42.bottom))) { if (((scaleCoordinates(object42.left) < xcoordinate) && (xcoordinate < scaleCoordinates(object42.right))) && ((scaleCoordinates(object42.top) < ycoordinate) && (ycoordinate < scaleCoordinates(object42.bottom)))) {
return { return {
"name": object42.name, "name": object42.name,
"type": object42.type, "type": object42.type,
} }
} }
object43 = boundaryArr[slide]["F12I5"] object43 = boundaryArr[slide]["F12I5"]
if (((object43.left < xcoordinate) && (xcoordinate < object43.right)) && ((object43.top < ycoordinate) && (ycoordinate < object43.bottom))) { if (((scaleCoordinates(object43.left) < xcoordinate) && (xcoordinate < scaleCoordinates(object43.right))) && ((scaleCoordinates(object43.top) < ycoordinate) && (ycoordinate < scaleCoordinates(object43.bottom)))) {
return { return {
"name": object43.name, "name": object43.name,
"type": object43.type, "type": object43.type,
} }
} }
object44 = boundaryArr[slide]["F12I6"] object44 = boundaryArr[slide]["F12I6"]
if (((object44.left < xcoordinate) && (xcoordinate < object44.right)) && ((object44.top < ycoordinate) && (ycoordinate < object44.bottom))) { if (((scaleCoordinates(object44.left) < xcoordinate) && (xcoordinate < scaleCoordinates(object44.right))) && ((scaleCoordinates(object44.top) < ycoordinate) && (ycoordinate < scaleCoordinates(object44.bottom)))) {
return { return {
"name": object44.name, "name": object44.name,
"type": object44.type, "type": object44.type,
} }
} }
if ((xcoordinate < x_center) && (ycoordinate < y_center)) {
return { return {
"name": "none", "name": "topleft",
"type": "none" "type": "none"
} }
} }
if ((xcoordinate > x_center) && (ycoordinate < y_center)) {
return {
"name": "topright",
"type": "none"
}
}
if ((xcoordinate < x_center) && (ycoordinate > y_center)) {
return {
"name": "bottomleft",
"type": "none"
}
}
if ((xcoordinate > x_center) && (ycoordinate > y_center)) {
return {
"name": "bottomright",
"type": "none"
}
}
}
//slide13 //slide13
if (slide == "s13") { if (slide == "s13") {
object45 = boundaryArr[slide]["F13I1"] object45 = boundaryArr[slide]["F13I1"]
if (((object45.left < xcoordinate) && (xcoordinate < object45.right)) && ((object45.top < ycoordinate) && (ycoordinate < object45.bottom))) { if (((scaleCoordinates(object45.left) < xcoordinate) && (xcoordinate < scaleCoordinates(object45.right))) && ((scaleCoordinates(object45.top) < ycoordinate) && (ycoordinate < scaleCoordinates(object45.bottom)))) {
return { return {
"name": object45.name, "name": object45.name,
"type": object45.type, "type": object45.type,
} }
} }
object46 = boundaryArr[slide]["F13I2"] object46 = boundaryArr[slide]["F13I2"]
if (((object46.left < xcoordinate) && (xcoordinate < object46.right)) && ((object46.top < ycoordinate) && (ycoordinate < object46.bottom))) { if (((scaleCoordinates(object46.left) < xcoordinate) && (xcoordinate < scaleCoordinates(object46.right))) && ((scaleCoordinates(object46.top) < ycoordinate) && (ycoordinate < scaleCoordinates(object46.bottom)))) {
return { return {
"name": object46.name, "name": object46.name,
"type": object46.type, "type": object46.type,
} }
} }
object47 = boundaryArr[slide]["F13I3"] object47 = boundaryArr[slide]["F13I3"]
if (((object47.left < xcoordinate) && (xcoordinate < object47.right)) && ((object47.top < ycoordinate) && (ycoordinate < object47.bottom))) { if (((scaleCoordinates(object47.left) < xcoordinate) && (xcoordinate < scaleCoordinates(object47.right))) && ((scaleCoordinates(object47.top) < ycoordinate) && (ycoordinate < scaleCoordinates(object47.bottom)))) {
return { return {
"name": object47.name, "name": object47.name,
"type": object47.type, "type": object47.type,
} }
} }
object48 = boundaryArr[slide]["F13I4"] object48 = boundaryArr[slide]["F13I4"]
if (((object48.left < xcoordinate) && (xcoordinate < object48.right)) && ((object48.top < ycoordinate) && (ycoordinate < object48.bottom))) { if (((scaleCoordinates(object48.left) < xcoordinate) && (xcoordinate < scaleCoordinates(object48.right))) && ((scaleCoordinates(object48.top) < ycoordinate) && (ycoordinate < scaleCoordinates(object48.bottom)))) {
return { return {
"name": object48.name, "name": object48.name,
"type": object48.type, "type": object48.type,
} }
} }
object49 = boundaryArr[slide]["F13I5"] object49 = boundaryArr[slide]["F13I5"]
if (((object49.left < xcoordinate) && (xcoordinate < object49.right)) && ((object49.top < ycoordinate) && (ycoordinate < object49.bottom))) { if (((scaleCoordinates(object49.left) < xcoordinate) && (xcoordinate < scaleCoordinates(object49.right))) && ((scaleCoordinates(object49.top) < ycoordinate) && (ycoordinate < scaleCoordinates(object49.bottom)))) {
return { return {
"name": object49.name, "name": object49.name,
"type": object49.type, "type": object49.type,
} }
} }
object50 = boundaryArr[slide]["F13I6"] object50 = boundaryArr[slide]["F13I6"]
if (((object50.left < xcoordinate) && (xcoordinate < object50.right)) && ((object50.top < ycoordinate) && (ycoordinate < object50.bottom))) { if (((scaleCoordinates(object50.left) < xcoordinate) && (xcoordinate < scaleCoordinates(object50.right))) && ((scaleCoordinates(object50.top) < ycoordinate) && (ycoordinate < scaleCoordinates(object50.bottom)))) {
return { return {
"name": object50.name, "name": object50.name,
"type": object50.type, "type": object50.type,
} }
} }
if ((xcoordinate < x_center) && (ycoordinate < y_center)) {
return { return {
"name": "none", "name": "topleft",
"type": "none" "type": "none"
} }
} }
if ((xcoordinate > x_center) && (ycoordinate < y_center)) {
return {
"name": "topright",
"type": "none"
}
}
if ((xcoordinate < x_center) && (ycoordinate > y_center)) {
return {
"name": "bottomleft",
"type": "none"
}
}
if ((xcoordinate > x_center) && (ycoordinate > y_center)) {
return {
"name": "bottomright",
"type": "none"
}
}
}
//slide14 //slide14
if (slide == "s14") { if (slide == "s14") {
object51 = boundaryArr[slide]["F14I1"] object51 = boundaryArr[slide]["F14I1"]
if (((object51.left < xcoordinate) && (xcoordinate < object51.right)) && ((object51.top < ycoordinate) && (ycoordinate < object51.bottom))) { if (((scaleCoordinates(object51.left) < xcoordinate) && (xcoordinate < scaleCoordinates(object51.right))) && ((scaleCoordinates(object51.top) < ycoordinate) && (ycoordinate < scaleCoordinates(object51.bottom)))) {
return { return {
"name": object51.name, "name": object51.name,
"type": object51.type, "type": object51.type,
} }
} }
object52 = boundaryArr[slide]["F14I2"] object52 = boundaryArr[slide]["F14I2"]
if (((object52.left < xcoordinate) && (xcoordinate < object52.right)) && ((object52.top < ycoordinate) && (ycoordinate < object52.bottom))) { if (((scaleCoordinates(object52.left) < xcoordinate) && (xcoordinate < scaleCoordinates(object52.right))) && ((scaleCoordinates(object52.top) < ycoordinate) && (ycoordinate < scaleCoordinates(object52.bottom)))) {
return { return {
"name": object52.name, "name": object52.name,
"type": object52.type, "type": object52.type,
} }
} }
object53 = boundaryArr[slide]["F14I3"] object53 = boundaryArr[slide]["F14I3"]
if (((object53.left < xcoordinate) && (xcoordinate < object53.right)) && ((object53.top < ycoordinate) && (ycoordinate < object53.bottom))) { if (((scaleCoordinates(object53.left) < xcoordinate) && (xcoordinate < scaleCoordinates(object53.right))) && ((scaleCoordinates(object53.top) < ycoordinate) && (ycoordinate < scaleCoordinates(object53.bottom)))) {
return { return {
"name": object53.name, "name": object53.name,
"type": object53.type, "type": object53.type,
} }
} }
object54 = boundaryArr[slide]["F14I4"] object54 = boundaryArr[slide]["F14I4"]
if (((object54.left < xcoordinate) && (xcoordinate < object54.right)) && ((object54.top < ycoordinate) && (ycoordinate < object54.bottom))) { if (((scaleCoordinates(object54.left) < xcoordinate) && (xcoordinate < scaleCoordinates(object54.right))) && ((scaleCoordinates(object54.top) < ycoordinate) && (ycoordinate < scaleCoordinates(object54.bottom)))) {
return { return {
"name": object54.name, "name": object54.name,
"type": object54.type, "type": object54.type,
} }
} }
object55 = boundaryArr[slide]["F14I5"] object55 = boundaryArr[slide]["F14I5"]
if (((object55.left < xcoordinate) && (xcoordinate < object55.right)) && ((object55.top < ycoordinate) && (ycoordinate < object55.bottom))) { if (((scaleCoordinates(object55.left) < xcoordinate) && (xcoordinate < scaleCoordinates(object55.right))) && ((scaleCoordinates(object55.top) < ycoordinate) && (ycoordinate < scaleCoordinates(object55.bottom)))) {
return { return {
"name": object55.name, "name": object55.name,
"type": object55.type, "type": object55.type,
} }
} }
object56 = boundaryArr[slide]["F14I6"] object56 = boundaryArr[slide]["F14I6"]
if (((object56.left < xcoordinate) && (xcoordinate < object56.right)) && ((object56.top < ycoordinate) && (ycoordinate < object56.bottom))) { if (((scaleCoordinates(object56.left) < xcoordinate) && (xcoordinate < scaleCoordinates(object56.right))) && ((scaleCoordinates(object56.top) < ycoordinate) && (ycoordinate < scaleCoordinates(object56.bottom)))) {
return { return {
"name": object56.name, "name": object56.name,
"type": object56.type, "type": object56.type,
} }
} }
if ((xcoordinate < x_center) && (ycoordinate < y_center)) {
return { return {
"name": "none", "name": "topleft",
"type": "none" "type": "none"
} }
} }
if ((xcoordinate > x_center) && (ycoordinate < y_center)) {
return {
"name": "topright",
"type": "none"
}
}
if ((xcoordinate < x_center) && (ycoordinate > y_center)) {
return {
"name": "bottomleft",
"type": "none"
}
}
if ((xcoordinate > x_center) && (ycoordinate > y_center)) {
return {
"name": "bottomright",
"type": "none"
}
}
}
//slide15 //slide15
if (slide == "s15") { if (slide == "s15") {
object57 = boundaryArr[slide]["F15I1"] object57 = boundaryArr[slide]["F15I1"]
if (((object57.left < xcoordinate) && (xcoordinate < object57.right)) && ((object57.top < ycoordinate) && (ycoordinate < object57.bottom))) { if (((scaleCoordinates(object57.left) < xcoordinate) && (xcoordinate < scaleCoordinates(object57.right))) && ((scaleCoordinates(object57.top) < ycoordinate) && (ycoordinate < scaleCoordinates(object57.bottom)))) {
return { return {
"name": object57.name, "name": object57.name,
"type": object57.type, "type": object57.type,
} }
} }
object58 = boundaryArr[slide]["F15I2"] object58 = boundaryArr[slide]["F15I2"]
if (((object58.left < xcoordinate) && (xcoordinate < object58.right)) && ((object58.top < ycoordinate) && (ycoordinate < object58.bottom))) { if (((scaleCoordinates(object58.left) < xcoordinate) && (xcoordinate < scaleCoordinates(object58.right))) && ((scaleCoordinates(object58.top) < ycoordinate) && (ycoordinate < scaleCoordinates(object58.bottom)))) {
return { return {
"name": object58.name, "name": object58.name,
"type": object58.type, "type": object58.type,
} }
} }
object59 = boundaryArr[slide]["F15I3"] object59 = boundaryArr[slide]["F15I3"]
if (((object59.left < xcoordinate) && (xcoordinate < object59.right)) && ((object59.top < ycoordinate) && (ycoordinate < object59.bottom))) { if (((scaleCoordinates(object59.left) < xcoordinate) && (xcoordinate < scaleCoordinates(object59.right))) && ((scaleCoordinates(object59.top) < ycoordinate) && (ycoordinate < scaleCoordinates(object59.bottom)))) {
return { return {
"name": object59.name, "name": object59.name,
"type": object59.type, "type": object59.type,
} }
} }
object60 = boundaryArr[slide]["F15I4"] object60 = boundaryArr[slide]["F15I4"]
if (((object60.left < xcoordinate) && (xcoordinate < object60.right)) && ((object60.top < ycoordinate) && (ycoordinate < object60.bottom))) { if (((scaleCoordinates(object60.left) < xcoordinate) && (xcoordinate < scaleCoordinates(object60.right))) && ((scaleCoordinates(object60.top) < ycoordinate) && (ycoordinate < scaleCoordinates(object60.bottom)))) {
return { return {
"name": object60.name, "name": object60.name,
"type": object60.type, "type": object60.type,
} }
} }
object61 = boundaryArr[slide]["F15I5"] object61 = boundaryArr[slide]["F15I5"]
if (((object61.left < xcoordinate) && (xcoordinate < object61.right)) && ((object61.top < ycoordinate) && (ycoordinate < object61.bottom))) { if (((scaleCoordinates(object61.left) < xcoordinate) && (xcoordinate < scaleCoordinates(object61.right))) && ((scaleCoordinates(object61.top) < ycoordinate) && (ycoordinate < scaleCoordinates(object61.bottom)))) {
return { return {
"name": object61.name, "name": object61.name,
"type": object61.type, "type": object61.type,
} }
} }
object62 = boundaryArr[slide]["F15I6"] object62 = boundaryArr[slide]["F15I6"]
if (((object62.left < xcoordinate) && (xcoordinate < object62.right)) && ((object62.top < ycoordinate) && (ycoordinate < object62.bottom))) { if (((scaleCoordinates(object62.left) < xcoordinate) && (xcoordinate < scaleCoordinates(object62.right))) && ((scaleCoordinates(object62.top) < ycoordinate) && (ycoordinate < scaleCoordinates(object62.bottom)))) {
return { return {
"name": object62.name, "name": object62.name,
"type": object62.type, "type": object62.type,
} }
} }
if ((xcoordinate < x_center) && (ycoordinate < y_center)) {
return {
"name": "topleft",
"type": "none"
}
}
if ((xcoordinate > x_center) && (ycoordinate < y_center)) {
return {
"name": "topright",
"type": "none"
}
}
if ((xcoordinate < x_center) && (ycoordinate > y_center)) {
return {
"name": "bottomleft",
"type": "none"
}
}
if ((xcoordinate > x_center) && (ycoordinate > y_center)) {
return { return {
"name": "none", "name": "bottomright",
"type": "none" "type": "none"
} }
} }
}
//slide16 //slide16
if (slide == "s16") { if (slide == "s16") {
object63 = boundaryArr[slide]["F16I1"] object63 = boundaryArr[slide]["F16I1"]
if (((object63.left < xcoordinate) && (xcoordinate < object63.right)) && ((object63.top < ycoordinate) && (ycoordinate < object63.bottom))) { if (((scaleCoordinates(object63.left) < xcoordinate) && (xcoordinate < scaleCoordinates(object63.right))) && ((scaleCoordinates(object63.top) < ycoordinate) && (ycoordinate < scaleCoordinates(object63.bottom)))) {
return { return {
"name": object63.name, "name": object63.name,
"type": object63.type, "type": object63.type,
} }
} }
object64 = boundaryArr[slide]["F16I2"] object64 = boundaryArr[slide]["F16I2"]
if (((object64.left < xcoordinate) && (xcoordinate < object64.right)) && ((object64.top < ycoordinate) && (ycoordinate < object64.bottom))) { if (((scaleCoordinates(object64.left) < xcoordinate) && (xcoordinate < scaleCoordinates(object64.right))) && ((scaleCoordinates(object64.top) < ycoordinate) && (ycoordinate < scaleCoordinates(object64.bottom)))) {
return { return {
"name": object64.name, "name": object64.name,
"type": object64.type, "type": object64.type,
} }
} }
object65 = boundaryArr[slide]["F16I3"] object65 = boundaryArr[slide]["F16I3"]
if (((object65.left < xcoordinate) && (xcoordinate < object65.right)) && ((object65.top < ycoordinate) && (ycoordinate < object65.bottom))) { if (((scaleCoordinates(object65.left) < xcoordinate) && (xcoordinate < scaleCoordinates(object65.right))) && ((scaleCoordinates(object65.top) < ycoordinate) && (ycoordinate < scaleCoordinates(object65.bottom)))) {
return { return {
"name": object65.name, "name": object65.name,
"type": object65.type, "type": object65.type,
} }
} }
object66 = boundaryArr[slide]["F16I4"] object66 = boundaryArr[slide]["F16I4"]
if (((object66.left < xcoordinate) && (xcoordinate < object66.right)) && ((object66.top < ycoordinate) && (ycoordinate < object66.bottom))) { if (((scaleCoordinates(object66.left) < xcoordinate) && (xcoordinate < scaleCoordinates(object66.right))) && ((scaleCoordinates(object66.top) < ycoordinate) && (ycoordinate < scaleCoordinates(object66.bottom)))) {
return { return {
"name": object66.name, "name": object66.name,
"type": object66.type, "type": object66.type,
} }
} }
object67 = boundaryArr[slide]["F16I5"] object67 = boundaryArr[slide]["F16I5"]
if (((object67.left < xcoordinate) && (xcoordinate < object67.right)) && ((object67.top < ycoordinate) && (ycoordinate < object67.bottom))) { if (((scaleCoordinates(object67.left) < xcoordinate) && (xcoordinate < scaleCoordinates(object67.right))) && ((scaleCoordinates(object67.top) < ycoordinate) && (ycoordinate < scaleCoordinates(object67.bottom)))) {
return { return {
"name": object67.name, "name": object67.name,
"type": object67.type, "type": object67.type,
} }
} }
object68 = boundaryArr[slide]["F16I6"] object68 = boundaryArr[slide]["F16I6"]
if (((object68.left < xcoordinate) && (xcoordinate < object68.right)) && ((object68.top < ycoordinate) && (ycoordinate < object68.bottom))) { if (((scaleCoordinates(object68.left) < xcoordinate) && (xcoordinate < scaleCoordinates(object68.right))) && ((scaleCoordinates(object68.top) < ycoordinate) && (ycoordinate < scaleCoordinates(object68.bottom)))) {
return { return {
"name": object68.name, "name": object68.name,
"type": object68.type, "type": object68.type,
} }
} }
if ((xcoordinate < x_center) && (ycoordinate < y_center)) {
return {
"name": "topleft",
"type": "none"
}
}
if ((xcoordinate > x_center) && (ycoordinate < y_center)) {
return { return {
"name": "none", "name": "topright",
"type": "none" "type": "none"
} }
} }
if ((xcoordinate < x_center) && (ycoordinate > y_center)) {
return {
"name": "bottomleft",
"type": "none"
}
}
if ((xcoordinate > x_center) && (ycoordinate > y_center)) {
return {
"name": "bottomright",
"type": "none"
}
}
}
//slide17 //slide17
if (slide == "s17") { if (slide == "s17") {
object69 = boundaryArr[slide]["F17I1"] object69 = boundaryArr[slide]["F17I1"]
if (((object69.left < xcoordinate) && (xcoordinate < object69.right)) && ((object69.top < ycoordinate) && (ycoordinate < object69.bottom))) { if (((scaleCoordinates(object69.left) < xcoordinate) && (xcoordinate < scaleCoordinates(object69.right))) && ((scaleCoordinates(object69.top) < ycoordinate) && (ycoordinate < scaleCoordinates(object69.bottom)))) {
return { return {
"name": object69.name, "name": object69.name,
"type": object69.type, "type": object69.type,
} }
} }
object70 = boundaryArr[slide]["F17I2"] object70 = boundaryArr[slide]["F17I2"]
if (((object70.left < xcoordinate) && (xcoordinate < object70.right)) && ((object70.top < ycoordinate) && (ycoordinate < object70.bottom))) { if (((scaleCoordinates(object70.left) < xcoordinate) && (xcoordinate < scaleCoordinates(object70.right))) && ((scaleCoordinates(object70.top) < ycoordinate) && (ycoordinate < scaleCoordinates(object70.bottom)))) {
return { return {
"name": object70.name, "name": object70.name,
"type": object70.type, "type": object70.type,
} }
} }
object71 = boundaryArr[slide]["F17I3"] object71 = boundaryArr[slide]["F17I3"]
if (((object71.left < xcoordinate) && (xcoordinate < object71.right)) && ((object71.top < ycoordinate) && (ycoordinate < object71.bottom))) { if (((scaleCoordinates(object71.left) < xcoordinate) && (xcoordinate < scaleCoordinates(object71.right))) && ((scaleCoordinates(object71.top) < ycoordinate) && (ycoordinate < objescaleCoordinates(ct71.bottom)))) {
return { return {
"name": object71.name, "name": object71.name,
"type": object71.type, "type": object71.type,
} }
} }
object72 = boundaryArr[slide]["F17I4"] object72 = boundaryArr[slide]["F17I4"]
if (((object72.left < xcoordinate) && (xcoordinate < object72.right)) && ((object72.top < ycoordinate) && (ycoordinate < object72.bottom))) { if (((scaleCoordinates(object72.left) < xcoordinate) && (xcoordinate < scaleCoordinates(object72.right))) && ((scaleCoordinates(object72.top) < ycoordinate) && (ycoordinate < scaleCoordinates(object72.bottom)))) {
return { return {
"name": object72.name, "name": object72.name,
"type": object72.type, "type": object72.type,
} }
} }
object73 = boundaryArr[slide]["F17I5"] object73 = boundaryArr[slide]["F17I5"]
if (((object73.left < xcoordinate) && (xcoordinate < object73.right)) && ((object73.top < ycoordinate) && (ycoordinate < object73.bottom))) { if (((scaleCoordinates(object73.left) < xcoordinate) && (xcoordinate < scaleCoordinates(object73.right))) && ((scaleCoordinates(object73.top) < ycoordinate) && (ycoordinate < scaleCoordinates(object73.bottom)))) {
return { return {
"name": object73.name, "name": object73.name,
"type": object73.type, "type": object73.type,
} }
} }
object74 = boundaryArr[slide]["F17I6"] object74 = boundaryArr[slide]["F17I6"]
if (((object74.left < xcoordinate) && (xcoordinate < object74.right)) && ((object74.top < ycoordinate) && (ycoordinate < object74.bottom))) { if (((scaleCoordinates(object74.left) < xcoordinate) && (xcoordinate < scaleCoordinates(object74.right))) && ((scaleCoordinates(object74.top) < ycoordinate) && (ycoordinate < scaleCoordinates(object74.bottom)))) {
return { return {
"name": object74.name, "name": object74.name,
"type": object74.type, "type": object74.type,
} }
} }
if ((xcoordinate < x_center) && (ycoordinate < y_center)) {
return {
"name": "topleft",
"type": "none"
}
}
if ((xcoordinate > x_center) && (ycoordinate < y_center)) {
return {
"name": "topright",
"type": "none"
}
}
if ((xcoordinate < x_center) && (ycoordinate > y_center)) {
return { return {
"name": "none", "name": "bottomleft",
"type": "none" "type": "none"
} }
} }
if ((xcoordinate > x_center) && (ycoordinate > y_center)) {
return {
"name": "bottomright",
"type": "none"
}
}
}
//slide18 //slide18
if (slide == "s18") { if (slide == "s18") {
object75 = boundaryArr[slide]["F18I1"] object75 = boundaryArr[slide]["F18I1"]
if (((object75.left < xcoordinate) && (xcoordinate < object75.right)) && ((object75.top < ycoordinate) && (ycoordinate < object75.bottom))) { if (((scaleCoordinates(object75.left) < xcoordinate) && (xcoordinate < scaleCoordinates(object75.right))) && ((scaleCoordinates(object75.top) < ycoordinate) && (ycoordinate < scaleCoordinates(object75.bottom)))) {
return { return {
"name": object75.name, "name": object75.name,
"type": object75.type, "type": object75.type,
} }
} }
object76 = boundaryArr[slide]["F18I2"] object76 = boundaryArr[slide]["F18I2"]
if (((object76.left < xcoordinate) && (xcoordinate < object76.right)) && ((object76.top < ycoordinate) && (ycoordinate < object76.bottom))) { if (((scaleCoordinates(object76.left) < xcoordinate) && (xcoordinate < scaleCoordinates(object76.right))) && ((scaleCoordinates(object76.top) < ycoordinate) && (ycoordinate < scaleCoordinates(object76.bottom)))) {
return { return {
"name": object76.name, "name": object76.name,
"type": object76.type, "type": object76.type,
} }
} }
object77 = boundaryArr[slide]["F18I3"] object77 = boundaryArr[slide]["F18I3"]
if (((object77.left < xcoordinate) && (xcoordinate < object77.right)) && ((object77.top < ycoordinate) && (ycoordinate < object77.bottom))) { if (((scaleCoordinates(object77.left) < xcoordinate) && (xcoordinate < scaleCoordinates(object77.right))) && ((scaleCoordinates(object77.top) < ycoordinate) && (ycoordinate < scaleCoordinates(object77.bottom)))) {
return { return {
"name": object77.name, "name": object77.name,
"type": object77.type, "type": object77.type,
} }
} }
object78 = boundaryArr[slide]["F18I4"] object78 = boundaryArr[slide]["F18I4"]
if (((object78.left < xcoordinate) && (xcoordinate < object78.right)) && ((object78.top < ycoordinate) && (ycoordinate < object78.bottom))) { if (((scaleCoordinates(object78.left) < xcoordinate) && (xcoordinate < scaleCoordinates(object78.right))) && ((scaleCoordinates(object78.top) < ycoordinate) && (ycoordinate < scaleCoordinates(object78.bottom)))) {
return { return {
"name": object78.name, "name": object78.name,
"type": object78.type, "type": object78.type,
} }
} }
object79 = boundaryArr[slide]["F18I5"] object79 = boundaryArr[slide]["F18I5"]
if (((object79.left < xcoordinate) && (xcoordinate < object79.right)) && ((object79.top < ycoordinate) && (ycoordinate < object79.bottom))) { if (((scaleCoordinates(object79.left) < xcoordinate) && (xcoordinate < scaleCoordinates(object79.right))) && ((scaleCoordinates(object79.top) < ycoordinate) && (ycoordinate < scaleCoordinates(object79.bottom)))) {
return { return {
"name": object79.name, "name": object79.name,
"type": object79.type, "type": object79.type,
} }
} }
object80 = boundaryArr[slide]["F18I6"] object80 = boundaryArr[slide]["F18I6"]
if (((object80.left < xcoordinate) && (xcoordinate < object80.right)) && ((object80.top < ycoordinate) && (ycoordinate < object80.bottom))) { if (((scaleCoordinates(object80.left) < xcoordinate) && (xcoordinate < scaleCoordinates(object80.right))) && ((scaleCoordinates(object80.top) < ycoordinate) && (ycoordinate < scaleCoordinates(object80.bottom)))) {
return { return {
"name": object80.name, "name": object80.name,
"type": object80.type, "type": object80.type,
} }
} }
if ((xcoordinate < x_center) && (ycoordinate < y_center)) {
return {
"name": "topleft",
"type": "none"
}
}
if ((xcoordinate > x_center) && (ycoordinate < y_center)) {
return {
"name": "topright",
"type": "none"
}
}
if ((xcoordinate < x_center) && (ycoordinate > y_center)) {
return { return {
"name": "none", "name": "bottomleft",
"type": "none" "type": "none"
} }
} }
if ((xcoordinate > x_center) && (ycoordinate > y_center)) {
return {
"name": "bottomright",
"type": "none"
}
}
}
//slide19 //slide19
if (slide == "s19") { if (slide == "s19") {
object81 = boundaryArr[slide]["F19I1"] object81 = boundaryArr[slide]["F19I1"]
if (((object81.left < xcoordinate) && (xcoordinate < object81.right)) && ((object81.top < ycoordinate) && (ycoordinate < object81.bottom))) { if (((scaleCoordinates(object81.left) < xcoordinate) && (xcoordinate < scaleCoordinates(object81.right))) && ((scaleCoordinates(object81.top) < ycoordinate) && (ycoordinate < scaleCoordinates(object81.bottom)))) {
return { return {
"name": object81.name, "name": object81.name,
"type": object81.type, "type": object81.type,
} }
} }
object82 = boundaryArr[slide]["F19I2"] object82 = boundaryArr[slide]["F19I2"]
if (((object82.left < xcoordinate) && (xcoordinate < object82.right)) && ((object82.top < ycoordinate) && (ycoordinate < object82.bottom))) { if (((scaleCoordinates(object82.left) < xcoordinate) && (xcoordinate < scaleCoordinates(object82.right))) && ((scaleCoordinates(object82.top) < ycoordinate) && (ycoordinate < scaleCoordinates(object82.bottom)))) {
return { return {
"name": object82.name, "name": object82.name,
"type": object82.type, "type": object82.type,
} }
} }
object83 = boundaryArr[slide]["F19I3"] object83 = boundaryArr[slide]["F19I3"]
if (((object83.left < xcoordinate) && (xcoordinate < object83.right)) && ((object83.top < ycoordinate) && (ycoordinate < object83.bottom))) { if (((scaleCoordinates(object83.left) < xcoordinate) && (xcoordinate < scaleCoordinates(object83.right))) && ((scaleCoordinates(object83.top) < ycoordinate) && (ycoordinate < scaleCoordinates(object83.bottom)))) {
return { return {
"name": object83.name, "name": object83.name,
"type": object83.type, "type": object83.type,
} }
} }
object84 = boundaryArr[slide]["F19I4"] object84 = boundaryArr[slide]["F19I4"]
if (((object84.left < xcoordinate) && (xcoordinate < object84.right)) && ((object84.top < ycoordinate) && (ycoordinate < object84.bottom))) { if (((scaleCoordinates(object84.left) < xcoordinate) && (xcoordinate < scaleCoordinates(object84.right))) && ((scaleCoordinates(object84.top) < ycoordinate) && (ycoordinate < scaleCoordinates(object84.bottom)))) {
return { return {
"name": object84.name, "name": object84.name,
"type": object84.type, "type": object84.type,
} }
} }
object85 = boundaryArr[slide]["F19I5"] object85 = boundaryArr[slide]["F19I5"]
if (((object85.left < xcoordinate) && (xcoordinate < object85.right)) && ((object85.top < ycoordinate) && (ycoordinate < object85.bottom))) { if (((scaleCoordinates(object85.left) < xcoordinate) && (xcoordinate < scaleCoordinates(object85.right))) && ((scaleCoordinates(object85.top) < ycoordinate) && (ycoordinate < scaleCoordinates(object85.bottom)))) {
return { return {
"name": object85.name, "name": object85.name,
"type": object85.type, "type": object85.type,
} }
} }
object86 = boundaryArr[slide]["F19I6"] object86 = boundaryArr[slide]["F19I6"]
if (((object86.left < xcoordinate) && (xcoordinate < object86.right)) && ((object86.top < ycoordinate) && (ycoordinate < object86.bottom))) { if (((scaleCoordinates(object86.left) < xcoordinate) && (xcoordinate < scaleCoordinates(object86.right))) && ((scaleCoordinates(object86.top) < ycoordinate) && (ycoordinate < scaleCoordinates(object86.bottom)))) {
return { return {
"name": object86.name, "name": object86.name,
"type": object86.type, "type": object86.type,
} }
} }
if ((xcoordinate < x_center) && (ycoordinate < y_center)) {
return {
"name": "topleft",
"type": "none"
}
}
if ((xcoordinate > x_center) && (ycoordinate < y_center)) {
return {
"name": "topright",
"type": "none"
}
}
if ((xcoordinate < x_center) && (ycoordinate > y_center)) {
return {
"name": "bottomleft",
"type": "none"
}
}
if ((xcoordinate > x_center) && (ycoordinate > y_center)) {
return { return {
"name": "none", "name": "bottomright",
"type": "none" "type": "none"
} }
} }
} }
}
// <!-- end webgazer --> // <!-- end webgazer -->
...@@ -1729,40 +2124,49 @@ ...@@ -1729,40 +2124,49 @@
//function for pause game //function for pause game
document.addEventListener('keyup', function (e) { document.addEventListener('keyup', function (e) {
//32 is space bar button ASCII value //32 is space bar button ASCII value
if(slide=="ch"){ if (slide == "ch") {
if (e.which === 32) { if (e.which === 32) {
if(!taskPaused){ if (!taskPaused) {
pauseTask(); pauseTask();
}else{ } else {
resumeTask(); resumeTask();
} }
// alert("Game is paused"); // alert("Game is paused");
}else if (e.which === 13 && taskPaused) { } else if (e.which === 13 && taskPaused) {
stopTask(); stopTask();
} }
} }
}); });
function pauseTask(){ function pauseTask() {
if(!taskPaused){ if (!taskPaused) {
console.log("puased"); console.log("puased");
clearInterval(taskLoop); clearInterval(taskLoop);
clearTimeout(tempT) clearTimeout(tempT)
webgazer.pause(); webgazer.pause();
taskPaused = true; taskPaused = true;
pausedTime = Date.now();
console.log("pausedTime");
console.log(pausedTime);
console.log("pausedTime");
} }
} }
function resumeTask(){ function resumeTask() {
if(taskPaused){ if (taskPaused) {
console.log("resumed"); console.log("resumed");
taskLoop = setInterval(showSlide, 7000); startTime = startTime + (Date.now() - pausedTime);
console.log("startTime");
console.log(startTime);
console.log("startTime");
taskLoop = setInterval(showSlide, 9000);
webgazer.resume(); webgazer.resume();
taskPaused = false; taskPaused = false;
} }
} }
function stopTask(){ function stopTask() {
console.log("stoped"); console.log("stoped");
$(".slide").hide(); $(".slide").hide();
...@@ -1776,13 +2180,14 @@ ...@@ -1776,13 +2180,14 @@
//calculate object percentages for each slide //calculate object percentages for each slide
calculatePercentArray(arr, percentArr); calculatePercentArray(arr, percentArr);
calculatePercentArray2(arr, percentArr2);
//showResults(a); //showResults(slideNumber);
sendGazeDataToBackend(arr, percentArr); sendGazeDataToBackend(arr, percentArr);
} }
function calculatePercentArray(arr, percentArr){ function calculatePercentArray(arr, percentArr) {
for (let slide in arr) { for (let slide in arr) {
OList = arr[slide].map((x) => { OList = arr[slide].map((x) => {
...@@ -1809,35 +2214,57 @@ ...@@ -1809,35 +2214,57 @@
} }
} }
// function pasuseGame(){ function calculatePercentArray2(arr, percentArr2) {
// clearInterval(interval); OListAll = [];
// isPaused = true; for (let slide in arr) {
// canvas.style.opacity = 0.5;
// canvascontext.font = "90px tahoma"; OList = arr[slide].map((x) => {
// canvascontext.fillstyle = "white"; return x.type
// canvascontext.textAlign = "center"; })
// canvascontext.textBaseline = "middle";
// canvascontext.fillText("Game Paused", 400,250) console.log("OList 1")
// } console.log(OList)
OListAll = OListAll.concat(OList);
const count = {};
for (const element of OList) {
if (count[element]) {
count[element] += 1;
} else {
count[element] = 1;
}
}
var tot = OList.length
percentArr2[slide] = {}
for (let type in count) {
percentArr2[slide][type] = 100 * count[type] / tot
}
// function resumeGame(){ }
// isPaused = false; const count2 = {};
// canvascontext.clearRect(0, 0, canvas.width, canvas.height); console.log("OListAll 1")
// canvas.style.opacity = 1; console.log(OListAll)
// interval = setInterval(showSlide, 20); for (const element of OListAll) {
// } if (count2[element]) {
count2[element] += 1;
} else {
count2[element] = 1;
}
}
// function gameOver(){ console.log("OListAll 2")
// isGameOver = true; console.log(OListAll)
// canvas.style.opacity = 0.5; var tot2 = OListAll.length
// canvascontext.font = "90px tahoma";
// canvascontext.fillstyle = "white";
// canvascontext.textAlign = "center";
// canvascontext.textBaseline = "middle";
// canvascontext.fillText("Game Over", 400,170);
percentArr2["sall"] = {}
for (let type in count2) {
percentArr2["sall"][type] = 100 * count2[type] / tot2
}
}
// }
var tempT; var tempT;
function showSlide() { function showSlide() {
...@@ -1845,7 +2272,7 @@ ...@@ -1845,7 +2272,7 @@
stopTask(); stopTask();
}else{ } else {
$(".slide").hide(); $(".slide").hide();
...@@ -1890,8 +2317,6 @@ ...@@ -1890,8 +2317,6 @@
}); });
} }
var myChart;
function showResults(a) {
var dynamicColors = function () { var dynamicColors = function () {
var r = Math.floor(Math.random() * 255); var r = Math.floor(Math.random() * 255);
...@@ -1901,13 +2326,19 @@ ...@@ -1901,13 +2326,19 @@
return "rgb(" + r + "," + g + "," + b + ")"; return "rgb(" + r + "," + g + "," + b + ")";
}; };
var slidename = "s" +a;
var labelsArr = Object.getOwnPropertyNames(percentArr[slidename]); function drawChart(slideNumber, array, chart, canvasName, chartTitle) {
$("#" + canvasName).hide();
var slidename = "s" + slideNumber;
if(!array[slidename]){
return;
}
var labelsArr = Object.getOwnPropertyNames(array[slidename]);
var valuesArr = []; var valuesArr = [];
var colorArr = []; var colorArr = [];
labelsArr.forEach((label) => { labelsArr.forEach((label) => {
valuesArr.push(percentArr[slidename][label]); valuesArr.push(array[slidename][label]);
colorArr.push(dynamicColors()); colorArr.push(dynamicColors());
}) })
...@@ -1915,7 +2346,7 @@ ...@@ -1915,7 +2346,7 @@
labels: labelsArr, labels: labelsArr,
datasets: [ datasets: [
{ {
label: 'Slide ' + a, label: 'Slide ' + slideNumber,
data: valuesArr, data: valuesArr,
backgroundColor: colorArr, backgroundColor: colorArr,
} }
...@@ -1934,18 +2365,67 @@ ...@@ -1934,18 +2365,67 @@
}, },
title: { title: {
display: true, display: true,
text: 'Slide ' + a text: chartTitle
}
},
scales: {
xAxes: [{
display: true,
scaleLabel: {
display: true,
labelString: 'Month test example'
} }
}],
yAxes: [{
display: true,
scaleLabel: {
display: true,
labelString: 'Value test example'
}
}]
} }
}, },
}; };
if(myChart){ if (chart) {
console.log("AFASFASFASFASFASFSAFSAAFAFASFSAFASFDFAFA"); chart.destroy();
myChart.destroy(); }
// console.log("valuesArr")
// console.log(valuesArr)
// console.log("valuesArr")
chart = new Chart(document.getElementById(canvasName), config);
if (valuesArr.length>0){
$("#" + canvasName).show();
}
return chart;
}
var objectChart;
var typeChart;
function showResults(slideNumber) {
if (slideNumber == "all") {
$("#objectChart").hide();
if (objectChart) {
objectChart.destroy();
}
if (typeChart) {
typeChart.destroy();
}
typeChart = drawChart(slideNumber, percentArr2, typeChart, 'typeChart', 'Type Percentage - All')
} else {
$("#objectChart").show()
if (objectChart) {
objectChart.destroy();
}
objectChart = drawChart(slideNumber, percentArr, objectChart, 'objectChart', 'Object Percentage')
if (typeChart) {
typeChart.destroy();
}
typeChart = drawChart(slideNumber, percentArr2, typeChart, 'typeChart', 'Type Percentage')
} }
myChart = new Chart(document.getElementById('myChart'), config);
$("#dropdown").show();
$("#resultChart").show(); $("#resultChart").show();
$("#dropdown").show();
$("#details").show();
} }
</script> </script>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment