Skip to content

Commit

Permalink
Fixed bug in the smootScroll directive where offset was wrongly inver…
Browse files Browse the repository at this point in the history
…ted twice.
  • Loading branch information
oblador committed Apr 9, 2014
1 parent 0ad030c commit 94f904c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion angular-scroll.js
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ directive('duSmoothScroll', function(scroller, duScrollDuration, duScrollContext
if (e.stopPropagation) e.stopPropagation();
if (e.preventDefault) e.preventDefault();

var offset = -($attr.offset ? parseInt($attr.offset, 10) : 0);
var offset = ($attr.offset ? parseInt($attr.offset, 10) : 0);
var duration = $attr.duration ? parseInt($attr.duration, 10) : duScrollDuration;
var context = duScrollContextAPI.getContext($scope);

Expand Down
2 changes: 1 addition & 1 deletion src/directives/smooth-scroll.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ directive('duSmoothScroll', function(scroller, duScrollDuration, duScrollContext
if (e.stopPropagation) e.stopPropagation();
if (e.preventDefault) e.preventDefault();

var offset = -($attr.offset ? parseInt($attr.offset, 10) : 0);
var offset = ($attr.offset ? parseInt($attr.offset, 10) : 0);
var duration = $attr.duration ? parseInt($attr.duration, 10) : duScrollDuration;
var context = duScrollContextAPI.getContext($scope);

Expand Down

0 comments on commit 94f904c

Please sign in to comment.