Commit 1d835085 by Jorem Magcawas

bug fix

parent bbf00f27
window.onclick = (event) => {
if (event.path[0].id == 'pause') {
disableForm();
}
if (event.path[0].id == 'continue') {
enableForm();
}
}
function disableForm() {
var element = document.getElementById("TiffViewer_ButtonContainer");
element.style.visibility = 'hidden';
}
function enableForm() {
var element = document.getElementById("TiffViewer_ButtonContainer");
element.style.visibility = 'visible';
}
...@@ -149,6 +149,7 @@ ...@@ -149,6 +149,7 @@
</script> </script>
<script src="./src/endSession/endSession.js"></script> <script src="./src/endSession/endSession.js"></script>
<script src="./src/tiffViewer/tiffViewer.js"></script> <script src="./src/tiffViewer/tiffViewer.js"></script>
<!-- <script src="./src/highlight/highlight.js"></script> disble highlight--> <script src="./disable.js"></script>
<!-- <script src="./src/highlight/highlight.js"></script> -->
</html> </html>
\ No newline at end of file
...@@ -65,7 +65,6 @@ const startMetricCapture = () => { ...@@ -65,7 +65,6 @@ const startMetricCapture = () => {
window.onclick = (event) => { window.onclick = (event) => {
if (event.path[0].id == 'pause') { if (event.path[0].id == 'pause') {
console.log("im paused");
pauseMetricCapture(); pauseMetricCapture();
} }
} }
...@@ -102,7 +101,7 @@ const showMetricCapture = () => { ...@@ -102,7 +101,7 @@ const showMetricCapture = () => {
let time_spent = ((Date.now() - time_start) / 1000) - time_pause_spent; let time_spent = ((Date.now() - time_start) / 1000) - time_pause_spent;
let rate = ((key_strokes / time_spent) * 3600).toFixed(0); let rate = ((key_strokes / time_spent) * 3600).toFixed(0);
rate >= ALLOWED_KPH ? obj.className = "green" : obj.className = "red"; rate >= ALLOWED_KPH ? obj.className = "green" : obj.className = "red";
obj.innerHTML = rate + " kph"; // immediately apply start value obj.innerHTML = (rate < 0 ? 0 : rate) + " kph"; // immediately apply start value
} }
interval = setTimeout(showMetricCapture, 1000); interval = setTimeout(showMetricCapture, 1000);
} }
...@@ -203,6 +202,7 @@ function promptPaused() { ...@@ -203,6 +202,7 @@ function promptPaused() {
message.innerHTML = 'Session Paused'; message.innerHTML = 'Session Paused';
var okButton = document.createElement('button'); var okButton = document.createElement('button');
okButton.setAttribute("id", "continue");
okButton.innerHTML = 'continue'; okButton.innerHTML = 'continue';
okButton.onclick = function () { okButton.onclick = function () {
promptMain.style.display = 'none'; promptMain.style.display = 'none';
......
...@@ -616,6 +616,6 @@ function TIFFViewer(xhr, TiffViewerImageName) { ...@@ -616,6 +616,6 @@ function TIFFViewer(xhr, TiffViewerImageName) {
div.scrollTop += 20; div.scrollTop += 20;
} }
}); });
initHighlight(); // initHighlight();
} }
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