Skip to content

Commit

Permalink
Update Chrome background rendering fix
Browse files Browse the repository at this point in the history
  • Loading branch information
markdalgleish committed Jan 6, 2012
1 parent c0aafc3 commit ec79af4
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 deletions.
18 changes: 10 additions & 8 deletions stellar.js
Original file line number Diff line number Diff line change
Expand Up @@ -181,16 +181,18 @@
this._findBackgrounds();

// Fix for Chrome background rendering bug
setTimeout(function(){
var oldLeft = self._getScrollLeft(),
oldTop = self._getScrollTop();
if (navigator.userAgent.indexOf('Chrome') > 0) {
$(window).load(function(){
var oldLeft = self._getScrollLeft(),
oldTop = self._getScrollTop();

self._setScrollLeft(oldLeft + 1);
self._setScrollTop(oldTop + 1);
self._setScrollLeft(oldLeft + 1);
self._setScrollTop(oldTop + 1);

self._setScrollLeft(oldLeft);
self._setScrollTop(oldTop);
}, 5);
self._setScrollLeft(oldLeft);
self._setScrollTop(oldTop);
});
}
},
_findParticles: function(){
var self = this,
Expand Down
Loading

0 comments on commit ec79af4

Please sign in to comment.