Skip to content

Commit

Permalink
Increase the scanning increase for skipping lines of text - 11d4307 m…
Browse files Browse the repository at this point in the history
…ade it a bit too hard to enter scanning mode. Shifting the balance away from scrolling changes and towards eye movements should make things more responsive and decrease false positives, hopefully.
  • Loading branch information
adelizkeith committed Mar 10, 2023
1 parent 59416b0 commit be0364e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/components/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,7 @@ export default class App extends Component {
// Scale the impact of this saccade by the amount of text skipped by this saccade.
// Because we didn't hit one of the other types of detectors, changeY will be at least 2.5 lines skipped.

var scoreChange = Math.abs(changeY) * 5;
var scoreChange = Math.abs(changeY) * 6;
if (scoreChange > 25) {
scoreChange = 25;
}
Expand Down Expand Up @@ -486,8 +486,8 @@ export default class App extends Component {

handleScroll(event) {

// When scrolls occur, we should assume the current fixation is broken and lock the detectors for a bit - currently 1/3 second of lockout.
scrollLockout = Math.floor(REFRESH_RATE / 3);
// When scrolls occur, we should assume the current fixation is broken and lock the detectors for a bit - currently three frames of lockout.
scrollLockout = Math.floor(REFRESH_RATE / 11);

// Calculate the distance scrolled and increment the scanning detector, as fast scrolling is a sign of scanning.
var last = lastScrollPosition;
Expand Down

0 comments on commit be0364e

Please sign in to comment.