update xml parsing

This commit is contained in:
Luke Pulverenti 2016-12-02 15:10:35 -05:00
parent c22321c3f9
commit 7ce49ea1e8
9 changed files with 88 additions and 78 deletions

View file

@ -252,21 +252,20 @@
var rotationInterval;
var currentRotatingImages = [];
var currentRotationIndex = -1;
function setBackdrops(items, imageSetId) {
function setBackdrops(items, enableRotation) {
var images = getImageUrls(items);
imageSetId = imageSetId || new Date().getTime();
if (images.length) {
startRotation(images, imageSetId);
startRotation(images, enableRotation);
} else {
clearBackdrop();
}
}
function startRotation(images) {
function startRotation(images, enableImageRotation) {
if (arraysEqual(images, currentRotatingImages)) {
return;
@ -277,7 +276,7 @@
currentRotatingImages = images;
currentRotationIndex = -1;
if (images.length > 1 && enableRotation()) {
if (images.length > 1 && enableRotation() && enableImageRotation !== false) {
rotationInterval = setInterval(onRotationInterval, 20000);
}
onRotationInterval();