ソースを参照

Merge branch 'fix-notes-after-pr-435' of https://github.com/ericweikl/reveal.js

Hakim El Hattab 11 年 前
コミット
f1234e51e1
1 ファイル変更6 行追加6 行削除
  1. 6 6
      js/reveal.js

+ 6 - 6
js/reveal.js

@@ -1918,11 +1918,11 @@ var Reveal = (function(){
 
 				toArray( fragments ).forEach( function( element ) {
 					element.classList.add( 'visible' );
-
-					// Notify subscribers of the change
-					dispatchEvent( 'fragmentshown', { fragment: element } );
 				} );
 
+				// Notify subscribers of the change
+				dispatchEvent( 'fragmentshown', { fragment: fragments[0], fragments: fragments } );
+
 				updateControls();
 				return true;
 			}
@@ -1952,11 +1952,11 @@ var Reveal = (function(){
 
 				toArray( fragments ).forEach( function( f ) {
 					f.classList.remove( 'visible' );
-
-					// Notify subscribers of the change
-					dispatchEvent( 'fragmenthidden', { fragment: f } );
 				} );
 
+				// Notify subscribers of the change
+				dispatchEvent( 'fragmenthidden', { fragment: fragments[0], fragments: fragments } );
+
 				updateControls();
 				return true;
 			}