瀏覽代碼

simplify condition #1434

Hakim El Hattab 9 年之前
父節點
當前提交
bef2722eed
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      js/reveal.js

+ 1 - 1
js/reveal.js

@@ -2798,7 +2798,7 @@
 				horizontalOffsetMultiplier = config.parallaxBackgroundHorizontal;
 			}
 			else {
-				horizontalOffsetMultiplier = ( horizontalSlideCount-1  > 0) ? ( backgroundWidth - slideWidth ) / ( horizontalSlideCount-1 ) : 0;
+				horizontalOffsetMultiplier = horizontalSlideCount > 1 ? ( backgroundWidth - slideWidth ) / ( horizontalSlideCount-1 ) : 0;
 			}
 
 			horizontalOffset = horizontalOffsetMultiplier * indexh * -1;