Skip to content

Commit

Permalink
fix(scroller): remove scroll event
Browse files Browse the repository at this point in the history
  • Loading branch information
ajoslin committed Jul 29, 2013
1 parent 2698a5a commit c8b170e
Showing 1 changed file with 0 additions and 22 deletions.
22 changes: 0 additions & 22 deletions src/services/scroller.js
Original file line number Diff line number Diff line change
Expand Up @@ -162,28 +162,6 @@ angular.module('ajoslin.scrolly.scroller', [
var transformer = self.transformer = new $transformer(elm);
var dragger = self.dragger = new $dragger(elm);

/*
var SCROLL_OFFSET = 200;
setTimeout(function() {
document.body.scrollTop = SCROLL_OFFSET;
document.body.style[$transformer.transformProp] = 'translate3d(0, '+SCROLL_OFFSET+'px, 0)';
});
angular.element($window).bind('scroll', function() {
var scroll = document.body.scrollTop - SCROLL_OFFSET;
var newPos = transformer.pos - scroll;
calculateHeight();
if (newPos >= 0) {
transformer.setTo(0);
} else if (newPos <= -self.scrollHeight) {
transformer.setTo(-self.scrollHeight);
} else {
transformer.setTo(newPos);
}
document.body.scrollTop = SCROLL_OFFSET;
});
*/

self.calculateHeight = function() {
var rect = $scroller.getContentRect(raw);
//TODO find a better way to get the height of the wrapper/screen
Expand Down

0 comments on commit c8b170e

Please sign in to comment.