aboutsummaryrefslogtreecommitdiffhomepage
path: root/js/reveal.js
diff options
context:
space:
mode:
authorHakim El Hattab2013-02-02 20:05:09 -0500
committerHakim El Hattab2013-02-02 20:05:09 -0500
commitc50ae08fe0ff52aa32c9dc203637b9e46efeacbb (patch)
tree2957ecbf1a7ab8657158a35856faf722b08e0d72 /js/reveal.js
parent723bd1cc0b7288deae9d20cbf6a4d72583b39437 (diff)
remove extra padding in stacks, add api method to retrieve curren scale (#310)
Diffstat (limited to 'js/reveal.js')
-rw-r--r--js/reveal.js10
1 files changed, 9 insertions, 1 deletions
diff --git a/js/reveal.js b/js/reveal.js
index 5ceb9a2..6ee0156 100644
--- a/js/reveal.js
+++ b/js/reveal.js
@@ -94,6 +94,9 @@ var Reveal = (function(){
// all current slides.
state = [],
+ // The current scale of the presentation (see width/height config)
+ scale = 1,
+
// Cached references to DOM elements
dom = {},
@@ -591,7 +594,7 @@ var Reveal = (function(){
dom.slides.style.height = slideHeight + 'px';
// Determine scale of content to fit within available space
- var scale = Math.min( availableWidth / slideWidth, availableHeight / slideHeight );
+ scale = Math.min( availableWidth / slideWidth, availableHeight / slideHeight );
// Respect max/min scale settings
scale = Math.max( scale, config.minScale );
@@ -1835,6 +1838,11 @@ var Reveal = (function(){
return currentSlide;
},
+ // Returns the current scale of the presentation content
+ getScale: function() {
+ return scale;
+ },
+
// Helper method, retrieves query string as a key/value hash
getQueryHash: function() {
var query = {};