Skip to content

Commit

Permalink
attempt #2 fix skrollr refresh between loading of views
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesjwarren committed Feb 13, 2015
1 parent 136fadc commit 71fd74d
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions app/js/thisissoon-core/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ angular.module("thisissoon.core", [
"$rootScope",
"ResizeService",
"$window",
"$document",
"$timeout",
"CacheService",
"snSkrollr",
"ENV",
Expand All @@ -39,7 +39,7 @@ angular.module("thisissoon.core", [
* @param {Service} $rootScope
* @param {Service} CacheService
*/
function ($rootScope, ResizeService, $window, $document, CacheService, snSkrollr, ENV) {
function ($rootScope, ResizeService, $window, $timeout, CacheService, snSkrollr, ENV) {

ResizeService.add($rootScope.$id, function(event, size) {
if (size.width >= 1024 && !$rootScope.skrollrInitialised) {
Expand Down Expand Up @@ -67,9 +67,7 @@ angular.module("thisissoon.core", [
// close nav menu when changing views
$rootScope.$on("$routeChangeSuccess", function() {
CacheService.put("loading", false);
if ($rootScope.skrollrInitialised) {
$document.ready(snSkrollr.refresh);
}
$timeout(snSkrollr.refresh, 200);
});

}
Expand Down

0 comments on commit 71fd74d

Please sign in to comment.