sakabako/scrollMonitor — pull request #7 by wGEric (2013-01-16 20:59:04+00:00)
Title: Fixed a bug that would cause events to fire at the wrong time since the ...

...initial value of some variables was wrong.

I was doing something like `elementWatcher.one('enterViewport', function() {});` and when I scrolled a tiny bit it would fire that event for all elements even if they weren't on the page. I tracked it down to all of the 'was' variables being set to undefined when initially setup which causes the callbacks for when you skip past an element to get triggered.

This pull request makes all of the 'was' variables get set after positions and everything have been calculated.