diff --git a/modules/src/xibo-elements-render.js b/modules/src/xibo-elements-render.js index 6eda8ba067..423415a5d3 100644 --- a/modules/src/xibo-elements-render.js +++ b/modules/src/xibo-elements-render.js @@ -28,8 +28,6 @@ jQuery.fn.extend({ duration: 50, durationIsPerItem: false, numItems: 1, - takeItemsFrom: 'start', - reverseOrder: 0, itemsPerPage: 1, speed: 2, previewWidth: 0, diff --git a/modules/src/xibo-text-render.js b/modules/src/xibo-text-render.js index 24bb4753ef..5417427757 100644 --- a/modules/src/xibo-text-render.js +++ b/modules/src/xibo-text-render.js @@ -26,9 +26,7 @@ jQuery.fn.extend({ pauseEffectOnStart: true, duration: '50', durationIsPerItem: false, - numItems: 0, - takeItemsFrom: 'start', - reverseOrder: 0, + numItems: 1, itemsPerPage: 0, speed: '2', previewWidth: 0, @@ -75,6 +73,9 @@ jQuery.fn.extend({ } }; + // If number of items is not defined, get it from the item count + options.numItems = options.numItems ? options.numItems : items.length; + // Calculate the dimensions of this item // based on the preview/original dimensions let width = height = 0; @@ -247,6 +248,8 @@ jQuery.fn.extend({ // Change the number of items numberOfItems = $(slides).length; + } else if (options.type === 'text') { + numberOfItems = $(slides).length; } const numberOfSlides = (options.itemsPerPage > 1) ? diff --git a/modules/templates/article-static.xml b/modules/templates/article-static.xml index 7fd9a35087..1de3ef5a37 100644 --- a/modules/templates/article-static.xml +++ b/modules/templates/article-static.xml @@ -325,7 +325,7 @@ $(target).xiboTextRender(properties, $(target).find('#content > .image, #content {{#if image}}{{/if}}
]]> @@ -696,7 +696,7 @@ $(target).xiboTextRender(properties, $(target).find('#content > .image, #content