lib/resources/assets/revealjs-redhat/lib/js/debug/reveal.js in hyla-1.0.9.pre.2 vs lib/resources/assets/revealjs-redhat/lib/js/debug/reveal.js in hyla-1.0.9.pre.3
- old
+ new
@@ -1,10 +1,11 @@
/*!
* reveal.js
* http://lab.hakim.se/reveal-js
* MIT licensed
* Version 3.1.0
+ * Including modifocations to support margin left & height
*
* Copyright (C) 2015 Hakim El Hattab, http://hakim.se
*/
(function( root, factory ) {
if( typeof define === 'function' && define.amd ) {
@@ -40,10 +41,14 @@
height: 700,
// Factor of the display size that should remain empty around the content
margin: 0.1,
+ // Top and Left margins to reposition the slides
+ marginTop: '',
+ marginLeft: '',
+
// Bounds for smallest/largest possible scale to apply to content
minScale: 0.2,
maxScale: 1.5,
// Display controls in the bottom right corner
@@ -1532,18 +1537,24 @@
}
else {
// Prefer zooming in desktop Chrome so that content remains crisp
if( !isMobileDevice && /chrome/i.test( navigator.userAgent ) && typeof dom.slides.style.zoom !== 'undefined' ) {
dom.slides.style.zoom = scale;
+ dom.slides.style.marginTop = config.marginTop;
+ dom.slides.style.marginLeft = config.marginLeft;
transformSlides( { layout: '' } );
}
// Apply scale transform as a fallback
else {
- dom.slides.style.left = '50%';
- dom.slides.style.top = '50%';
- dom.slides.style.bottom = 'auto';
- dom.slides.style.right = 'auto';
- transformSlides( { layout: 'translate(-50%, -50%) scale('+ scale +')' } );
+ // dom.slides.style.left = '50%';
+ // dom.slides.style.top = '44%';
+ // dom.slides.style.bottom = 'auto';
+ // dom.slides.style.right = 'auto';
+ dom.slides.style.marginTop = config.marginTop;
+ dom.slides.style.marginLeft = config.marginLeft;
+ dom.slides.style.marginBottom = 'auto';
+ dom.slides.style.marginRight = 'auto';
+ transformSlides( { layout: 'translate(-50%, -50%) scale('+ scale +') translate(50%, 50%)' } );
}
}
// Select all slides, vertical and horizontal
var slides = toArray( dom.wrapper.querySelectorAll( SLIDES_SELECTOR ) );
\ No newline at end of file