+
+
Time
+
+ 0:00 AM
+
+
+ 00:00:00
+
+
-
-
-
--
cgit v1.2.3
From 37ebe0732c411bee812852e80294bd36d75cd76c Mon Sep 17 00:00:00 2001
From: Hakim El Hattab
Date: Tue, 22 Apr 2014 15:05:06 +0200
Subject: skip transitions in notes window for better main window performance
---
plugin/notes/notes.html | 14 +++-----------
1 file changed, 3 insertions(+), 11 deletions(-)
(limited to 'plugin/notes/notes.html')
diff --git a/plugin/notes/notes.html b/plugin/notes/notes.html
index 9e9dfb5..e488075 100644
--- a/plugin/notes/notes.html
+++ b/plugin/notes/notes.html
@@ -252,25 +252,17 @@
*/
function setupIframes( data ) {
- var currentParams = [
+ var params = [
'receiver',
'progress=false',
'history=false',
- 'postMessageEvents=true'
- ].join( '&' );
-
- var upcomingParams = [
- 'receiver',
- 'progress=false',
- 'history=false',
- 'controls=false',
'transition=none',
'backgroundTransition=none'
].join( '&' );
var hash = '#/' + data.state.indexh + '/' + data.state.indexv;
- var currentURL = data.url + '?' + currentParams + hash;
- var upcomingURL = data.url + '?' + upcomingParams + hash;
+ var currentURL = data.url + '?' + params + '&postMessageEvents=true' + hash;
+ var upcomingURL = data.url + '?' + params + '&controls=false' + hash;
currentSlide = document.createElement( 'iframe' );
currentSlide.setAttribute( 'width', 1280 );
--
cgit v1.2.3
From 1e5ca748a49b35ec698fc73d0420bb63534b9ae7 Mon Sep 17 00:00:00 2001
From: Hakim El Hattab
Date: Sat, 26 Apr 2014 11:35:55 +0200
Subject: enable reveal.js keyboard shortcuts anywhere in notes window
---
js/reveal.js | 5 +++++
plugin/notes/notes.html | 14 ++++++++++++++
2 files changed, 19 insertions(+)
(limited to 'plugin/notes/notes.html')
diff --git a/js/reveal.js b/js/reveal.js
index 7a032d0..d81a19d 100644
--- a/js/reveal.js
+++ b/js/reveal.js
@@ -3702,6 +3702,11 @@ var Reveal = (function(){
if( 'addEventListener' in window ) {
( dom.wrapper || document.querySelector( '.reveal' ) ).removeEventListener( type, listener, useCapture );
}
+ },
+
+ // Programatically triggers a keyboard event
+ triggerKey: function( keyCode ) {
+ onDocumentKeyDown( { keyCode: keyCode } );
}
};
diff --git a/plugin/notes/notes.html b/plugin/notes/notes.html
index e488075..30e1669 100644
--- a/plugin/notes/notes.html
+++ b/plugin/notes/notes.html
@@ -208,6 +208,7 @@
connected = true;
setupIframes( data );
+ setupKeyboard();
setupNotes();
setupTimer();
}
@@ -247,6 +248,19 @@
// Limit to max one state update per X ms
handleStateMessage = debounce( handleStateMessage, 200 );
+ /**
+ * Forward keyboard events to the current slide window.
+ * This enables keyboard events to work even if focus
+ * isn't set on the current slide iframe.
+ */
+ function setupKeyboard() {
+
+ document.addEventListener( 'keydown', function( event ) {
+ currentSlide.contentWindow.postMessage( JSON.stringify({ method: 'triggerKey', args: [ event.keyCode ] }), '*' );
+ } );
+
+ }
+
/**
* Creates the preview iframes.
*/
--
cgit v1.2.3
From fa6187072e70ed8c8f08df6a4a6bd4d68db8074e Mon Sep 17 00:00:00 2001
From: Hakim El Hattab
Date: Sun, 4 May 2014 08:13:03 +0200
Subject: clicking on notes timer now resets it #779
---
plugin/notes/notes.html | 19 ++++++++++++++++++-
1 file changed, 18 insertions(+), 1 deletion(-)
(limited to 'plugin/notes/notes.html')
diff --git a/plugin/notes/notes.html b/plugin/notes/notes.html
index 30e1669..43385bf 100644
--- a/plugin/notes/notes.html
+++ b/plugin/notes/notes.html
@@ -82,6 +82,17 @@
margin-bottom: 10px;
padding: 10px 16px;
padding-bottom: 20px;
+ cursor: pointer;
+ }
+
+ .speaker-controls-time .reset-button {
+ opacity: 0;
+ float: right;
+ color: #666;
+ text-decoration: none;
+ }
+ .speaker-controls-time:hover .reset-button {
+ opacity: 1;
}
.speaker-controls-time .timer,
@@ -144,7 +155,7 @@
UPCOMING:
-
Time
+
Time Click to Reset
0:00 AM
@@ -340,6 +351,12 @@
// Then update every second
setInterval( _updateTimer, 1000 );
+ timeEl.addEventListener( 'click', function() {
+ start = new Date();
+ _updateTimer();
+ return false;
+ } );
+
}
function zeroPadInteger( num ) {
--
cgit v1.2.3
From f28b380fac76583c1572c82abc229b49f54dc2fc Mon Sep 17 00:00:00 2001
From: Hakim El Hattab
Date: Sun, 28 Sep 2014 17:13:49 +0200
Subject: prevent auto-sliding in notes frames #1004
---
plugin/notes/notes.html | 1 +
1 file changed, 1 insertion(+)
(limited to 'plugin/notes/notes.html')
diff --git a/plugin/notes/notes.html b/plugin/notes/notes.html
index 43385bf..1429004 100644
--- a/plugin/notes/notes.html
+++ b/plugin/notes/notes.html
@@ -282,6 +282,7 @@
'progress=false',
'history=false',
'transition=none',
+ 'autoSlide=0',
'backgroundTransition=none'
].join( '&' );
--
cgit v1.2.3
From cef19486b89ed7d101acfc1992af2e49e88c371d Mon Sep 17 00:00:00 2001
From: Hakim El Hattab
Date: Thu, 16 Oct 2014 13:09:54 +0200
Subject: better handling of overflowing speaker notes #1017
---
plugin/notes/notes.html | 1 +
1 file changed, 1 insertion(+)
(limited to 'plugin/notes/notes.html')
diff --git a/plugin/notes/notes.html b/plugin/notes/notes.html
index 1429004..0cc8cf6 100644
--- a/plugin/notes/notes.html
+++ b/plugin/notes/notes.html
@@ -59,6 +59,7 @@
right: 0;
width: 35%;
height: 60%;
+ overflow: auto;
font-size: 18px;
}
--
cgit v1.2.3
From 9bcd1484bc583ffe015c5296e6a42c17f578ae49 Mon Sep 17 00:00:00 2001
From: Hakim El Hattab
Date: Fri, 25 Sep 2015 09:41:05 +0200
Subject: notes defined in data-notes attributes retain preformatted whitespace
---
plugin/notes/notes.html | 1 +
plugin/notes/notes.js | 2 ++
2 files changed, 3 insertions(+)
(limited to 'plugin/notes/notes.html')
diff --git a/plugin/notes/notes.html b/plugin/notes/notes.html
index 0cc8cf6..75f1b9b 100644
--- a/plugin/notes/notes.html
+++ b/plugin/notes/notes.html
@@ -239,6 +239,7 @@
// No need for updating the notes in case of fragment changes
if ( data.notes ) {
notes.classList.remove( 'hidden' );
+ notesValue.style.whiteSpace = data.whitespace;
if( data.markdown ) {
notesValue.innerHTML = marked( data.notes );
}
diff --git a/plugin/notes/notes.js b/plugin/notes/notes.js
index e42329d..a0e8021 100644
--- a/plugin/notes/notes.js
+++ b/plugin/notes/notes.js
@@ -55,12 +55,14 @@ var RevealNotes = (function() {
type: 'state',
notes: '',
markdown: false,
+ whitespace: 'normal',
state: Reveal.getState()
};
// Look for notes defined in a slide attribute
if( slideElement.hasAttribute( 'data-notes' ) ) {
messageData.notes = slideElement.getAttribute( 'data-notes' );
+ messageData.whitespace = 'pre-wrap';
}
// Look for notes defined in an aside element
--
cgit v1.2.3