Merge pull request #2940 from cmeessen/fix_multiple_data-background
Fix: multiple image-urls in data-background-image
This commit is contained in:
commit
a112712f12
@ -102,7 +102,13 @@ export default class SlideContent {
|
|||||||
|
|
||||||
// Images
|
// Images
|
||||||
if( backgroundImage ) {
|
if( backgroundImage ) {
|
||||||
backgroundContent.style.backgroundImage = 'url('+ encodeURI( backgroundImage ) +')';
|
let backgroundString = '';
|
||||||
|
backgroundImage.split(',').forEach(background => {
|
||||||
|
backgroundString = backgroundString.concat(
|
||||||
|
'url(' + encodeURI(background.trim()) + '),'
|
||||||
|
);
|
||||||
|
});
|
||||||
|
backgroundContent.style.backgroundImage = backgroundString.substr(0, backgroundString.length - 1);
|
||||||
}
|
}
|
||||||
// Videos
|
// Videos
|
||||||
else if ( backgroundVideo && !this.Reveal.isSpeakerNotes() ) {
|
else if ( backgroundVideo && !this.Reveal.isSpeakerNotes() ) {
|
||||||
|
Loading…
Reference in New Issue
Block a user