소스 검색

cleanup classes when backgrounds are synced

Hakim El Hattab 10 년 전
부모
커밋
03c3031cb4
1개의 변경된 파일4개의 추가작업 그리고 0개의 파일을 삭제
  1. 4 0
      js/reveal.js

+ 4 - 0
js/reveal.js

@@ -716,6 +716,10 @@
 
 		container.appendChild( element );
 
+		// If backgrounds are being recreated, clear old classes
+		slide.classList.remove( 'has-dark-background' );
+		slide.classList.remove( 'has-light-background' );
+
 		// If this slide has a background color, add a class that
 		// signals if it is light or dark. If the slide has no background
 		// color, no class will be set