Skip to content
This repository was archived by the owner on Apr 17, 2019. It is now read-only.

Commit 9e1ba43

Browse files
committed
Disable touch scroll handling
The app had some ad-hoc code to manage scroll events, which was causing problems on some touch screens. It's also unnecessary, as the items always fit vertically inside the nav pane. So remove the handler code.
1 parent 34edb12 commit 9e1ba43

File tree

1 file changed

+0
-21
lines changed

1 file changed

+0
-21
lines changed

app/js/flashcards.js

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -503,14 +503,6 @@ define(['getMessage', 'license', 'sound'], function (getMessage, license_init, G
503503
}
504504
};
505505

506-
/**
507-
* FlashCards.scrollNavPane will scroll the navigation Pane the direction the user moves the mouse
508-
* @private
509-
*/
510-
FlashCards.prototype.scrollNavPane = function (delta) {
511-
document.getElementById("scroll-items").style.webkitTransform = "translateY("+delta+"px)";
512-
};
513-
514506
/**
515507
* FlashCards.setGameEventListeners sets event handlers for the game
516508
* @private
@@ -527,19 +519,6 @@ define(['getMessage', 'license', 'sound'], function (getMessage, license_init, G
527519
document.getElementById("nav-pane").addEventListener('click', function () {
528520
self.navPaneClicked();
529521
}, false);
530-
document.getElementById("scroll-overlay").addEventListener('mousedown', function (e) {
531-
starty = e.clientY;
532-
isDrag = 0; //mouse down
533-
}, false);
534-
document.getElementById("scroll-overlay").addEventListener('mousemove', function (e) {
535-
isDrag = 1; //mouse move
536-
}, false);
537-
document.getElementById("scroll-overlay").addEventListener('mouseup', function (e) {
538-
if(isDrag === 1) { //if equals 1 is drag event
539-
self.scrollNavPane((-1)*(starty-e.clientY));
540-
}
541-
isDrag = -1; //regardless reset endy
542-
}, false);
543522
document.getElementById("shape-deck").addEventListener('click', function (e) {
544523
e.stopPropagation();
545524
self.shapeDeckClicked();

0 commit comments

Comments
 (0)