Skip to content

Commit

Permalink
fix(listView): fixed active state on scroll
Browse files Browse the repository at this point in the history
  • Loading branch information
mlynch committed Apr 28, 2014
1 parent 3bf1cd3 commit 040af82
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion js/utils/activator.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
ionic.activator = {

start: function(e) {
var self = this;

// when an element is touched/clicked, it climbs up a few
// parents to see if it is an .item or .button element
Expand Down Expand Up @@ -39,7 +40,7 @@

// in XX milliseconds, set the queued elements to active
if(e.type === 'touchstart') {
setTimeout(activateElements, 80);
self._activateTimeout = setTimeout(activateElements, 80);
} else {
ionic.requestAnimationFrame(activateElements);
}
Expand All @@ -52,6 +53,7 @@

end: function() {
// clear out any active/queued elements after XX milliseconds
clearTimeout(this._activateTimeout)
setTimeout(clear, 200);
}

Expand All @@ -66,6 +68,7 @@
}

function activateElements() {
console.log('ACTIVATING');
// activate all elements in the queue
for(var key in queueElements) {
if(queueElements[key]) {
Expand Down

0 comments on commit 040af82

Please sign in to comment.