aboutsummaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorHakim El Hattab <hakim.elhattab@gmail.com>2019-01-31 20:09:45 +0100
committerGitHub <noreply@github.com>2019-01-31 20:09:45 +0100
commit9c1615fff1b9a31e4ea5bd0e33b585ee9a888b39 (patch)
tree26e7e7507a34f307f838ca9baf5f2deb29064b51 /README.md
parentaa8be6829cae09ffe0332120fc0007383d49d65c (diff)
parent126365627b30e66b4dc3e1407d1b457094f6cbc2 (diff)
downloadperl-software-in-gnu-guix-9c1615fff1b9a31e4ea5bd0e33b585ee9a888b39.tar
perl-software-in-gnu-guix-9c1615fff1b9a31e4ea5bd0e33b585ee9a888b39.tar.gz
Merge pull request #2300 from mw75/master
Resize Event
Diffstat (limited to 'README.md')
-rw-r--r--README.md9
1 files changed, 9 insertions, 0 deletions
diff --git a/README.md b/README.md
index 170fe48..8439017 100644
--- a/README.md
+++ b/README.md
@@ -42,6 +42,7 @@ reveal.js comes with a broad range of features including [nested slides](https:/
- [Fullscreen mode](#fullscreen-mode)
- [Embedded media](#embedded-media)
- [Stretching elements](#stretching-elements)
+ - [Resize Event](#resize-event)
- [postMessage API](#postmessage-api)
- [PDF Export](#pdf-export)
- [Theming](#theming)
@@ -991,6 +992,14 @@ Limitations:
- Only direct descendants of a slide section can be stretched
- Only one descendant per slide section can be stretched
+### Resize Event
+
+When reveal.js changes the scale of the slides it fires an resize event. You can subscribe to the event to resize your elements accordingly.
+
+```javascript
+Reveal.addEventListener( 'resize', function( event ) { /* console.log(event.scale,event.oldscale,event.size); */ } );
+```
+
### postMessage API
The framework has a built-in postMessage API that can be used when communicating with a presentation inside of another window. Here's an example showing how you'd make a reveal.js instance in the given window proceed to slide 2: