Merge pull request #1434 from mikemellor11/master
stops parallax failing if only the single horizontal slide and multiple vertical
This commit is contained in:
commit
31550d09e4
1 changed files with 1 additions and 1 deletions
|
@ -2798,7 +2798,7 @@
|
||||||
horizontalOffsetMultiplier = config.parallaxBackgroundHorizontal;
|
horizontalOffsetMultiplier = config.parallaxBackgroundHorizontal;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
horizontalOffsetMultiplier = ( backgroundWidth - slideWidth ) / ( horizontalSlideCount-1 );
|
horizontalOffsetMultiplier = ( horizontalSlideCount-1 > 0) ? ( backgroundWidth - slideWidth ) / ( horizontalSlideCount-1 ) : 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
horizontalOffset = horizontalOffsetMultiplier * indexh * -1;
|
horizontalOffset = horizontalOffsetMultiplier * indexh * -1;
|
||||||
|
|
Loading…
Reference in a new issue