mirror of
https://github.com/Noratrieb/slides.git
synced 2026-01-14 08:25:05 +01:00
tidy up code for #2940
This commit is contained in:
parent
a112712f12
commit
236d3e3722
3 changed files with 5 additions and 9 deletions
|
|
@ -102,13 +102,9 @@ export default class SlideContent {
|
|||
|
||||
// Images
|
||||
if( backgroundImage ) {
|
||||
let backgroundString = '';
|
||||
backgroundImage.split(',').forEach(background => {
|
||||
backgroundString = backgroundString.concat(
|
||||
'url(' + encodeURI(background.trim()) + '),'
|
||||
);
|
||||
});
|
||||
backgroundContent.style.backgroundImage = backgroundString.substr(0, backgroundString.length - 1);
|
||||
backgroundContent.style.backgroundImage = backgroundImage.split( ',' ).map( background => {
|
||||
return `url(${encodeURI(background.trim())})`;
|
||||
}).join( ',' );
|
||||
}
|
||||
// Videos
|
||||
else if ( backgroundVideo && !this.Reveal.isSpeakerNotes() ) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue