소스 검색

tidy up code for #2940

Hakim El Hattab 4 년 전
부모
커밋
236d3e3722
3개의 변경된 파일3개의 추가작업 그리고 7개의 파일을 삭제
  1. 0 0
      dist/reveal.esm.js
  2. 0 0
      dist/reveal.js
  3. 3 7
      js/controllers/slidecontent.js

파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 0 - 0
dist/reveal.esm.js


파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 0 - 0
dist/reveal.js


+ 3 - 7
js/controllers/slidecontent.js

@@ -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() ) {

이 변경점에서 너무 많은 파일들이 변경되어 몇몇 파일들은 표시되지 않았습니다.