Skip to content

Commit

Permalink
Released 0.2.6.
Browse files Browse the repository at this point in the history
  • Loading branch information
oblador committed Feb 4, 2014
1 parent bb14514 commit 8382a2c
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 7 deletions.
7 changes: 4 additions & 3 deletions angular-scroll.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
angular.module('duScroll', ['duScroll.scroller', 'duScroll.scrollPosition', 'duScroll.scrollspy', 'duScroll.requestAnimation', 'duScroll.smoothScroll']);
angular.module('duScroll', ['duScroll.scroller', 'duScroll.scrollPosition', 'duScroll.scrollspy', 'duScroll.requestAnimation', 'duScroll.smoothScroll']).value('duScrollDuration', 1000);


angular.module('duScroll.requestAnimation', []).
Expand Down Expand Up @@ -123,7 +123,7 @@ factory('scroller',


angular.module('duScroll.smoothScroll', ['duScroll.scroller']).
directive('duSmoothScroll', function(scroller){
directive('duSmoothScroll', function(scroller, duScrollDuration){

return {
link : function($scope, $element, $attr){
Expand All @@ -137,9 +137,10 @@ directive('duSmoothScroll', function(scroller){
if (e.preventDefault) e.preventDefault();

var offset = -($attr.offset ? parseInt($attr.offset, 10) : 0);
var duration = $attr.duration ? parseInt($attr.duration, 10) : duScrollDuration;
var pos = elem.getBoundingClientRect();

scroller.scrollDelta(0, pos.top + (isNaN(offset) ? 0 : offset), 1000);
scroller.scrollDelta(0, pos.top + (isNaN(offset) ? 0 : offset), duration);
});
}
};
Expand Down
2 changes: 1 addition & 1 deletion angular-scroll.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion angular-scroll.min.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "angular-scroll",
"version": "0.2.5",
"version": "0.2.6",
"main": "angular-scroll.min.js",
"ignore": [
"**/.*",
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "angular-scroll",
"version": "0.2.5",
"version": "0.2.6",
"description": "Scrollspy, animated scrollTo and scroll events",
"keywords": ["angular", "smooth-scroll", "scrollspy", "scrollTo", "scrolling"],
"main": "angular-scroll.min.js",
Expand Down

0 comments on commit 8382a2c

Please sign in to comment.