update code style to match rest of reveal.js, disable parallax by default #595

edit
Hakim El Hattab 2013-09-15 14:48:54 -04:00
parent 2fc0dfa8e1
commit 347a907041
5 changed files with 40 additions and 38 deletions

View File

@ -1405,6 +1405,7 @@ body {
/*********************************************
* PARALLAX BACKGROUND
*********************************************/
.reveal[data-parallax-background] {
-webkit-transition: all 0.8s ease;
-moz-transition: all 0.8s ease;

View File

@ -367,8 +367,8 @@ function linkify( selector ) {
transition: Reveal.getQueryHash().transition || 'default', // default/cube/page/concave/zoom/linear/fade/none
// Parallax scrolling
parallaxBackgroundImage: "url('https://s3.amazonaws.com/hakim-static/reveal-js/reveal-parallax-1.jpg')",
parallaxBackgroundSize: "2100px 900px",
// parallaxBackgroundImage: "url('https://s3.amazonaws.com/hakim-static/reveal-js/reveal-parallax-1.jpg')",
// parallaxBackgroundSize: "2100px 900px",
// Optional libraries used to extend on reveal.js
dependencies: [

View File

@ -1503,17 +1503,18 @@ var Reveal = (function(){
if( bs.length === 1 ) {
bgWidth = bgHeight = parseInt( bs[0], 10 );
} else {
}
else {
bgWidth = parseInt( bs[0], 10 );
bgHeight = parseInt( bs[1], 10 );
}
var slideWidth = parseInt(dom.wrapper.offsetWidth, 10);
var slideWidth = dom.wrapper.offsetWidth;
var horizontalSlideCount = horizontalSlides.length;
var horizontalOffset = -( bgWidth - slideWidth ) / ( horizontalSlideCount-1 ) * h;
var slideHeight = parseInt(dom.wrapper.offsetHeight, 10);
var slideHeight = dom.wrapper.offsetHeight;
var verticalSlideCount = currentVerticalSlides.length;
var verticalOffset = verticalSlideCount > 0 ? -( bgHeight - slideHeight ) / ( verticalSlideCount-1 ) * v : 0;

4
js/reveal.min.js vendored

File diff suppressed because one or more lines are too long