aboutsummaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorMario Wolff <mario.wolff@in.sachen.it>2019-01-15 13:13:19 +0100
committerMario Wolff <mario.wolff@in.sachen.it>2019-01-15 13:13:19 +0100
commitabee356e42bd27a06db3f1308fd7b751de646102 (patch)
tree201ad123a98d3382db73b5628973e63183e9f18f /README.md
parent0b3e7839ebf4ed8b6c180aca0abafa28c67aee6d (diff)
downloadperl-software-in-gnu-guix-abee356e42bd27a06db3f1308fd7b751de646102.tar
perl-software-in-gnu-guix-abee356e42bd27a06db3f1308fd7b751de646102.tar.gz
emmit resize event if scale changed
Diffstat (limited to 'README.md')
-rw-r--r--README.md8
1 files changed, 8 insertions, 0 deletions
diff --git a/README.md b/README.md
index a301d5f..4804c29 100644
--- a/README.md
+++ b/README.md
@@ -958,6 +958,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( 'overviewshown', 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: