src/heatmap.js
function startIdle() {
        var idleCount = 0;

        function idle() {

            coordinates.push({
                t: 1,
                x: lastX,
                y: lastY
            });
            idleCount++;
            if (idleCount > 10) {
                clearInterval(idleInterval);
            }
        }
        idle();
        idleInterval = setInterval(idle, 1000);
    }
function startIdle() {
        var idleCount = 0;

        function idle() {

            coordinates.push({
                t: 1,
                x: lastX,
                y: lastY
            });
            idleCount++;
            if (idleCount > 10) {
                clearInterval(idleInterval);
            }
        }
        idle();
        idleInterval = setInterval(idle, 1000);
    }
function startIdle ( ) { var idleCount = 0 ; function idle ( ) { coordinates . push ( { t : 1 , x : lastX , y : lastY } ) ; idleCount ++ ; if ( idleCount > 10 ) { clearInterval ( idleInterval ) ; } } idle ( ) ; idleInterval = setInterval ( idle , 1000 ) ; }
As the mouse stops moving the stream of events stop.
The user is deciding or reading text?! For 10 intervals
continue to add the position to the coordinates.
As the mouse stops moving the stream of events stop . The user is deciding or reading text?! For 10 intervals continue to add the position to the coordinates .