check for 0 division, stops parallax failing if only the single horizontal slide and multiple vertical
parent
822a9c937c
commit
3e42929f90
|
@ -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 New Issue