Browse Source

Fix: no parallax scrolling in FF

Fixed problem with parallax background  not working under FF
Michał Smoliński 11 years ago
parent
commit
2bd228534b
2 changed files with 2 additions and 5 deletions
  1. 1 4
      js/reveal.js
  2. 1 1
      js/reveal.min.js

+ 1 - 4
js/reveal.js

@@ -1510,14 +1510,11 @@ var Reveal = (function(){
 			var horizontalSlideCount = horizontalSlides.length;
 			var horizontalOffset = -(bgWidth - slideWidth)/(horizontalSlideCount-1) * h;
 		
-			dom.wrapper.style.backgroundPositionX = horizontalOffset + 'px';
-		
-		
 			var slideHeight = parseInt(dom.wrapper.offsetHeight, 10);
 			var verticalSlideCount = currentVerticalSlides.length;
 			var verticalOffset = verticalSlideCount > 0 ? -(bgHeight - slideHeight)/(verticalSlideCount-1) * v : 0;
 		
-			dom.wrapper.style.backgroundPositionY = verticalOffset + 'px';
+			dom.wrapper.style.backgroundPosition = horizontalOffset + 'px ' + verticalOffset + 'px';
 		}
 				
 		////////////////////////////////////

File diff suppressed because it is too large
+ 1 - 1
js/reveal.min.js


Some files were not shown because too many files changed in this diff