Skip to content

Commit

Permalink
Celebrating the fixed bug
Browse files Browse the repository at this point in the history
  • Loading branch information
kennyhong committed Sep 5, 2018
1 parent 46ed946 commit 45800b2
Show file tree
Hide file tree
Showing 5 changed files with 36 additions and 28 deletions.
4 changes: 2 additions & 2 deletions Study1/.sign/.manifest.tmp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
.DS_Store__DEL__LeMneZ9PYrUhcGhZ/AZhBlyxjSGpKWikADoxlvIN6zs=
app.js__DEL__Bs/YpuWV9bembqr38nt/qXfsyiR/fwcRE2B1kxk7Tm4=
app.js__DEL__zFVd0eLBZRSOelWgxSaf2hD8jIX+kmQe2E2Xc0SgX/8=
circle-helper.js__DEL__cq0mHRR3FpR6yRgzTacHH5yAR27ztNnArNc2uQI3vqQ=
config.xml__DEL__mZQS12cMGmSoEmC1cZB+72ruz/mZOHO4SdZ+k24XWy4=
css/style.css__DEL__Lb8VWHpM1cSEPl6uaq3kjSRAZ09j8O9MVV2qhFKgYi4=
Expand Down Expand Up @@ -456,4 +456,4 @@ test_files/study_setup/session2/p9.csv__DEL__kwIh7aiWr1Opovt7RMK40k+I65eWErjY/bW
test_files/study_setup/study.txt__DEL__jUe3A2q9UmMO6irJ/zcmdd5td7bZxPG97UPAdnjgoc8=
test_files/study_setup/watch_cdg_final.csv__DEL__KTHGaKi421jEOZNaVjjkKgXfGy80Qf4tDQdv4g2S4Fc=
test_files/study_setup/watch_transition_final.csv__DEL__+wXpRFuS7br8rSusz68Jdsay+YVigQntzLoCMH2oo3M=
author-signature.xml__DEL__cdV4EWRX/m7gmAZEGgcUvYRN7uQqSfYYERNqIotSW4k=
author-signature.xml__DEL__8KTVi0knQpCEmdCTC8+fF15WJ1fs+3CVmWhSuefB53M=
12 changes: 6 additions & 6 deletions Study1/.sign/author-signature.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
</Reference>
<Reference URI="app.js">
<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
<DigestValue>Bs/YpuWV9bembqr38nt/qXfsyiR/fwcRE2B1kxk7Tm4=</DigestValue>
<DigestValue>zFVd0eLBZRSOelWgxSaf2hD8jIX+kmQe2E2Xc0SgX/8=</DigestValue>
</Reference>
<Reference URI="circle-helper.js">
<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
Expand Down Expand Up @@ -1843,11 +1843,11 @@
</Reference>
</SignedInfo>
<SignatureValue>
AZJGpKBNWK5tOYJAKTOoNM44UcUb/F9/DtTGw5WsbpEps/u3M4nYkjBE2Ae/H3ckeZ0Cr//Nzs0X
5ng0HVbwQWLC78AD9KpnO4XjKXEY52+c2sTDrM5Y6Np1jcMk2ktMT1YCIk3RI1LPfJWsWb0NpyM8
k+bj0ahfjK/SruI5nReBnm7WnJg5OzVNYda55bdPX2evx8gLf46kpHaqIGg244pZzKU+BmMW6Laa
uiLYwcpj3WvMohssO1+G7KGY1vpnd5dvTNWjSRcRNqvx01qwLw/mV0YplIPXRUFK2eg+jpiR+hKq
4ISAdo9WhNjZRvzkM8SuTaYiqHuGgBMKKZdtTA==
MM4KwHr8jIlFAXfDGGi8R3FitWCrehTulx1KudMd+bjDxO+b1obneVeCbCe1tYrWzmdjO+LwJiHg
s/YF4GJIpl9Y1+3qP0+7SHi81U4+GG9MKdF4l27LJoOJEAZCyYxDYCa+eEa33XlzVLCJ2Rfrtsac
rxCxcA68qSS57YgIE46j4tlSvJpA75o11OhGeXKcqQIZlDtnbBbGREJachEi46c0C4uVyFCd69lj
qPA1VJcDWI1vmBrpUEvTPppyB5+iMefKKCHyelMzKaW97yGgQPolpuezAJrpCbfvOl080lKkhvkg
WzBJeqGgR6d0qB9OCq5hmRG2RM5uOJOXaX6CSQ==
</SignatureValue>
<KeyInfo>
<X509Data>
Expand Down
14 changes: 7 additions & 7 deletions Study1/.sign/signature1.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@
</Reference>
<Reference URI="app.js">
<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
<DigestValue>Bs/YpuWV9bembqr38nt/qXfsyiR/fwcRE2B1kxk7Tm4=</DigestValue>
<DigestValue>zFVd0eLBZRSOelWgxSaf2hD8jIX+kmQe2E2Xc0SgX/8=</DigestValue>
</Reference>
<Reference URI="author-signature.xml">
<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
<DigestValue>cdV4EWRX/m7gmAZEGgcUvYRN7uQqSfYYERNqIotSW4k=</DigestValue>
<DigestValue>8KTVi0knQpCEmdCTC8+fF15WJ1fs+3CVmWhSuefB53M=</DigestValue>
</Reference>
<Reference URI="circle-helper.js">
<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
Expand Down Expand Up @@ -1847,11 +1847,11 @@
</Reference>
</SignedInfo>
<SignatureValue>
gpjCLi7mkyjWNnzjEjk1cEK19NQBfsQDNK26CsJo8OW8ppMR4KvLOKv5SqnJJjro/N3uovYdUHoL
icqV4F5ct5MPT2dDrxWu1mQCJXhGPvlUkSWnJOpCf/Kj+HsTM6WkyOctwbfKVrHqFT2TR6VcQ82x
FaVmXHXjaL20qOAp8Fvy437SWHy2Zcm15FoWyoB9ewegLQKG/EzYRCm0dWFP0GAaOlhTfejIX2wX
/LXWYQWu54auboYkvU5LH14dM4mvJMF7FkpIpUIz5PinmDYC6fsyYM7dSUQrJWXohww5QT0ypDne
uDw62NEydzlpOogtYFnnEy0f8Wa5dbyWcS6SIQ==
rvBdSyViAsICcsXUBHZL+wlENJOnG/qX1JqOcF09ZprXgr/l9Jb7nmyz/sP4FAY8lSppwp0+DoLO
tGV58SyjIv2HUJx2HcONlfiZoY3gCb0aDEI+F4vPuMxHPQNeo6xyCVj3EYLnrBF+NHRHrEYHnFMz
q38sF18kaO3nBTxey6U9UXcwfsSanO1xxOBYBFTz2J161oOdF4JeEzM0Vd4bnV4Xw/RDSvfnNtK8
RVdIYFmX//blg/o/Hk5mEDZP7BKfKYSQ3VTaDxvEYI6Nudelw05xTDi326FVmOnbvlIEcFEe9oUh
mEbK+b1bN9qqi+taa+UrlCjjBZKI7KIh1idasw==
</SignatureValue>
<KeyInfo>
<X509Data>
Expand Down
Binary file modified Study1/Study1.wgt
Binary file not shown.
34 changes: 21 additions & 13 deletions Study1/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -393,6 +393,8 @@ function toggleTrial() {
window.addEventListener("rotarydetent", rotaryEventHandler);
state.innerHTML = "";
inTrial = true;
$('#ss_menu').show();
resetMenu();
setMenuLayout();
loadTarget();
motorRotationCount = 0;
Expand All @@ -408,9 +410,9 @@ function toggleTrial() {
if (currTrial < trials.length - 1) {
state.innerHTML = "Start";
currCondition.innerHTML = "Motor: " + trials[currTrial].motorCondition + " ticks";
resetMenu();
document.querySelector("#target-img").style.visibility = "hidden";
$("#target-img").attr('src', '');
$('#ss_menu').hide();
} else {
document.querySelector("#target-img").style.visibility = "hidden";
hideMenu();
Expand Down Expand Up @@ -591,7 +593,7 @@ function tutorialRotaryEventHandler(event) {
if (motorRotationConditions[trials[currTrial].motorCondition - 1] == motorRotationCount) {
navigator.vibrate(50);
if(inTrial && !firstRotationBool) {
firstRotationTime = Date.now() - currDate;
firstRotationTime= Date.now() - currDate;
timeoutHandler = setTimeout(function () {$('#ss_menu').show(); menuVisible = true}, 750);
firstRotationBool = true;
} else {
Expand All @@ -610,7 +612,7 @@ function tutorialRotaryEventHandler(event) {
motorRotationCount = 0;
}
currAngle -= 15;
data = {
data = {
timestamp : Date.now() - currDate,
event_type : "rotary",
x : 0,
Expand Down Expand Up @@ -651,9 +653,12 @@ function setMenuLayout() {
for (var ss_itr = 0; ss_itr < ss_menus.length; ss_itr++) {
let
ss_menu = ss_menus[ss_itr];
ss_menu.style.top = 40
ss_menu.style.top = page_center_y - ss_menu.getBoundingClientRect().top
- ss_menu.getBoundingClientRect().height / 2 - page_radius
* Math.cos(ss_seg_ang * ss_itr) + 'px';
ss_menu.style.left = 310
ss_menu.style.left = page_center_x
- ss_menu.getBoundingClientRect().left
- ss_menu.getBoundingClientRect().width / 2 + page_radius
* Math.sin(ss_seg_ang * ss_itr) + 'px';
var img = document.querySelectorAll("#menu-img");
img[ss_itr].src = imgPaths[conditionNum][ss_itr];
Expand All @@ -669,8 +674,13 @@ function setTutorialMenuLayout() {
for (var ss_itr = 0; ss_itr < ss_menus.length; ss_itr++) {
let
ss_menu = ss_menus[ss_itr];
ss_menu.style.top = 40 * Math.cos(ss_seg_ang * ss_itr) + 'px';
ss_menu.style.left = 170 * Math.sin(ss_seg_ang * ss_itr) + 'px';
ss_menu.style.top = page_center_y - ss_menu.getBoundingClientRect().top
- ss_menu.getBoundingClientRect().height / 2 - page_radius
* Math.cos(ss_seg_ang * ss_itr) + 'px';
ss_menu.style.left = page_center_x
- ss_menu.getBoundingClientRect().left
- ss_menu.getBoundingClientRect().width / 2 + page_radius
* Math.sin(ss_seg_ang * ss_itr) + 'px';
var img = document.querySelectorAll("#menu-img");
img[ss_itr].src = imgPaths[1][ss_itr];
}
Expand Down Expand Up @@ -829,7 +839,7 @@ function iterateTarget() {
if(trials[currTrial]){
if ((currTrial % 8) == 0) {
inTrial = false;
$('#ss-menu').show();
$('#ss_menu').show();
}
else {
$("#target-img").attr('src', imgPaths[conditionNum][trials[currTrial].target - 1]);
Expand All @@ -841,7 +851,7 @@ function iterateTarget() {
}
} else {
inTrial = false;
$('#ss-menu').show();
$('#ss_menu').show();
}
removeHighlight();
rotationCount = 0;
Expand All @@ -856,8 +866,7 @@ function iterateTutorial() {
if ((currTraining % 8) == 0) {
inTrial = false;
isTraining = false;
$('#ss-menu').show();
resetMenu();
$('#ss_menu').show();
}
else {
$("#target-img").attr('src', imgPaths[1][trainingTargets[currTraining] - 1]);
Expand All @@ -870,8 +879,7 @@ function iterateTutorial() {
} else {
inTrial = false;
isTraining = false;
$('#ss-menu').show();
resetMenu();
$('#ss_menu').show();
window.removeEventListener("rotarydetent", tutorialRotaryEventHandler);
}
removeHighlight();
Expand Down

0 comments on commit 45800b2

Please sign in to comment.