Skip to content

Commit b2a1a8e

Browse files
committed
Released 0.7.2
1 parent b25cffa commit b2a1a8e

File tree

5 files changed

+10
-8
lines changed

5 files changed

+10
-8
lines changed

angular-scroll.js

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,9 @@ angular.module('duScroll', [
3030
//Which events on the container (such as body) should cancel scroll animations
3131
.value('duScrollCancelOnEvents', 'scroll mousedown mousewheel touchmove keydown')
3232
//Whether or not to activate the last scrollspy, when page/container bottom is reached
33-
.value('duScrollBottomSpy', false);
33+
.value('duScrollBottomSpy', false)
34+
//Active class name
35+
.value('duScrollActiveClass', 'active');
3436

3537

3638
angular.module('duScroll.scrollHelpers', ['duScroll.requestAnimation'])
@@ -248,7 +250,7 @@ angular.module('duScroll.requestAnimation', ['duScroll.polyfill'])
248250

249251

250252
angular.module('duScroll.spyAPI', ['duScroll.scrollContainerAPI'])
251-
.factory('spyAPI', ["$rootScope", "$timeout", "$window", "$document", "scrollContainerAPI", "duScrollGreedy", "duScrollSpyWait", "duScrollBottomSpy", function($rootScope, $timeout, $window, $document, scrollContainerAPI, duScrollGreedy, duScrollSpyWait, duScrollBottomSpy) {
253+
.factory('spyAPI', ["$rootScope", "$timeout", "$window", "$document", "scrollContainerAPI", "duScrollGreedy", "duScrollSpyWait", "duScrollBottomSpy", "duScrollActiveClass", function($rootScope, $timeout, $window, $document, scrollContainerAPI, duScrollGreedy, duScrollSpyWait, duScrollBottomSpy, duScrollActiveClass) {
252254
'use strict';
253255

254256
var createScrollHandler = function(context) {
@@ -294,11 +296,11 @@ angular.module('duScroll.spyAPI', ['duScroll.scrollContainerAPI'])
294296
}
295297
if(currentlyActive === toBeActive || (duScrollGreedy && !toBeActive)) return;
296298
if(currentlyActive) {
297-
currentlyActive.$element.removeClass('active');
299+
currentlyActive.$element.removeClass(duScrollActiveClass);
298300
$rootScope.$broadcast('duScrollspy:becameInactive', currentlyActive.$element);
299301
}
300302
if(toBeActive) {
301-
toBeActive.$element.addClass('active');
303+
toBeActive.$element.addClass(duScrollActiveClass);
302304
$rootScope.$broadcast('duScrollspy:becameActive', toBeActive.$element);
303305
}
304306
context.currentlyActive = toBeActive;

angular-scroll.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

angular-scroll.min.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

bower.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "angular-scroll",
3-
"version": "0.7.1",
3+
"version": "0.7.2",
44
"main": "angular-scroll.js",
55
"ignore": [
66
"**/.*",

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "angular-scroll",
3-
"version": "0.7.1",
3+
"version": "0.7.2",
44
"description": "Scrollspy, animated scrollTo and scroll events",
55
"keywords": [
66
"angular",

0 commit comments

Comments
 (0)