Created
April 4, 2016 18:40
-
-
Save perliedman/544f479eca31378fa538923413e42b7c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
L.Map.addInitHook(function() { | |
var slides = document.querySelector('.slides'), | |
zoom = Number(slides.style.zoom); | |
// Reveal.js sometimes use the zoom CSS property, but sometimes a scale | |
// transform instead. We handle both. | |
if (zoom) { | |
this._container.style.zoom = 1/zoom; | |
} else { | |
zoom = Number(slides.style.transform.replace(/.*scale\(([0-9\.]+)\).*/, '$1')); | |
this._container.style.transform = 'scale(' + (1 / zoom) + ')'; | |
} | |
this.invalidateSize(); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment