فهرست منبع

Merge branch 'master' into feature/reader-mode

Hakim El Hattab 1 سال پیش
والد
کامیت
7108476911
6فایلهای تغییر یافته به همراه21 افزوده شده و 6 حذف شده
  1. 0 0
      dist/reveal.esm.js.map
  2. 14 3
      js/reveal.js
  3. 1 1
      package.json
  4. 0 0
      plugin/notes/notes.esm.js
  5. 0 0
      plugin/notes/notes.js
  6. 6 2
      plugin/notes/plugin.js

تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 0 - 0
dist/reveal.esm.js.map


+ 14 - 3
js/reveal.js

@@ -287,7 +287,18 @@ export default function( revealElement, options ) {
 
 
 		if( !config.showHiddenSlides ) {
 		if( !config.showHiddenSlides ) {
 			Util.queryAll( dom.wrapper, 'section[data-visibility="hidden"]' ).forEach( slide => {
 			Util.queryAll( dom.wrapper, 'section[data-visibility="hidden"]' ).forEach( slide => {
-				slide.parentNode.removeChild( slide );
+				const parent = slide.parentNode;
+
+				// If this slide is part of a stack and that stack will be
+				// empty after removing the hidden slide, remove the entire
+				// stack
+				if( parent.childElementCount === 1 && /section/i.test( parent.nodeName ) ) {
+					parent.remove();
+				}
+				else {
+					slide.remove();
+				}
+
 			} );
 			} );
 		}
 		}
 
 
@@ -473,8 +484,8 @@ export default function( revealElement, options ) {
 		dom.wrapper.setAttribute( 'data-background-transition', config.backgroundTransition );
 		dom.wrapper.setAttribute( 'data-background-transition', config.backgroundTransition );
 
 
 		// Expose our configured slide dimensions as custom props
 		// Expose our configured slide dimensions as custom props
-		dom.viewport.style.setProperty( '--slide-width', config.width + 'px' );
-		dom.viewport.style.setProperty( '--slide-height', config.height + 'px' );
+		dom.viewport.style.setProperty( '--slide-width', typeof config.width == 'string' ? config.width :  config.width + 'px' );
+		dom.viewport.style.setProperty( '--slide-height', typeof config.height == 'string' ? config.height :  config.height + 'px' );
 
 
 		if( config.shuffle ) {
 		if( config.shuffle ) {
 			shuffle();
 			shuffle();

+ 1 - 1
package.json

@@ -1,6 +1,6 @@
 {
 {
   "name": "reveal.js",
   "name": "reveal.js",
-  "version": "4.6.0",
+  "version": "4.6.1",
   "description": "The HTML Presentation Framework",
   "description": "The HTML Presentation Framework",
   "homepage": "https://revealjs.com",
   "homepage": "https://revealjs.com",
   "subdomain": "revealjs",
   "subdomain": "revealjs",

تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 0 - 0
plugin/notes/notes.esm.js


تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 0 - 0
plugin/notes/notes.js


+ 6 - 2
plugin/notes/plugin.js

@@ -146,8 +146,12 @@ const Plugin = () => {
 		}
 		}
 
 
 		// Look for notes defined in an aside element
 		// Look for notes defined in an aside element
-		if( notesElements ) {
-			messageData.notes = Array.from(notesElements).map( notesElement => notesElement.innerHTML ).join( '\n' );
+		if( notesElements && notesElements.length ) {
+			// Ignore notes inside of fragments since those are shown
+			// individually when stepping through fragments
+			notesElements = Array.from( notesElements ).filter( notesElement => notesElement.closest( '.fragment' ) === null );
+
+			messageData.notes = notesElements.map( notesElement => notesElement.innerHTML ).join( '\n' );
 			messageData.markdown = notesElements[0] && typeof notesElements[0].getAttribute( 'data-markdown' ) === 'string';
 			messageData.markdown = notesElements[0] && typeof notesElements[0].getAttribute( 'data-markdown' ) === 'string';
 		}
 		}
 
 

برخی فایل ها در این مقایسه diff نمایش داده نمی شوند زیرا تعداد فایل ها بسیار زیاد است