Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
17 changed files
with
247 additions
and
387 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
"use strict"; | ||
/** | ||
* Wrap skrollr.js | ||
* @author SOON_ | ||
* @module sn.skrollr | ||
*/ | ||
angular.module("sn.skrollr", []) | ||
|
||
/** | ||
* Provider to configuring skrollr | ||
* @example | ||
* snSkrollrProvider.init({ smoothScrolling: true }); | ||
* snSkrollr.init(); | ||
*/ | ||
.provider("snSkrollr", function snSkrollrProvider() { | ||
|
||
var _this = this; | ||
|
||
this.config = {}; | ||
|
||
this.$get = [ | ||
"$window", | ||
"$document", | ||
"$rootScope", | ||
/** | ||
* @constructor | ||
* @param {Object} $window angular wrapper for window | ||
* @param {Object} $rootScope angular root application scope | ||
*/ | ||
function($window, $document, $rootScope) { | ||
|
||
return { | ||
init: function() { | ||
|
||
$document.ready(function () { | ||
$rootScope.$apply(function() { | ||
var s = $window.skrollr.init(_this.config); | ||
}); | ||
}); | ||
|
||
} | ||
}; | ||
} | ||
]; | ||
}) | ||
|
||
/** | ||
* Refresh skrollrjs on element init | ||
* @class snSkrollr | ||
*/ | ||
.directive("snSkrollr", [ | ||
"$window", | ||
/** | ||
* @constructor | ||
*/ | ||
function ($window){ | ||
return { | ||
restrict: "AE", | ||
link: function($scope, $element) { | ||
$window.skrollr.refresh(); | ||
} | ||
}; | ||
} | ||
]); |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.