Skip to content

Commit

Permalink
Widget: Mastodon Stencil profile preview fix (#1931)
Browse files Browse the repository at this point in the history
  • Loading branch information
rubenberttpingol authored Jul 21, 2023
1 parent 0d0aa4c commit ab0bf10
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
10 changes: 7 additions & 3 deletions modules/src/player.js
Original file line number Diff line number Diff line change
Expand Up @@ -466,9 +466,13 @@ $(function() {
};
}

$content.append($(hbsTemplate).first()
const $elemContent = $('<div class="element-content"></div>');

$elemContent.html($(hbsTemplate).first().prop('outerHTML'));

$content.append($elemContent
.attr('id', data.elementId)
.addClass(`${data.id}--item`)
.addClass(`${data.uniqueID}--item`)
.css(cssStyles)
.prop('outerHTML'));
};
Expand Down Expand Up @@ -541,7 +545,7 @@ $(function() {
if (templateAlreadyAdded) {
$target.xiboElementsRender(
renderData,
$content.find(`.${templateData.id}--item`),
$content.find(`.${templateData.uniqueID}--item`),
);

// Handle the rendering of the template
Expand Down
2 changes: 1 addition & 1 deletion modules/src/xibo-elements-render.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ jQuery.fn.extend({
options.effect === 'noTransition' || options.effect === 'none'
) ? noTransitionSpeed : options.speed,
timeout: timeout,
slides: `> .${options.id}--item`,
slides: `> .${options.parentId}--item`,
autoHeight: false,
sync: false,
});
Expand Down

0 comments on commit ab0bf10

Please sign in to comment.