Browse Source

renamed .remaining-height to .stretch #244 #490 #561

embed
Hakim El Hattab 11 years ago
parent
commit
0748b68335
  1. 4
      css/reveal.css
  2. 2
      css/reveal.min.css
  3. 10
      js/reveal.js
  4. 4
      js/reveal.min.js

4
css/reveal.css

@ -318,7 +318,7 @@ body {
max-height: 400px;
word-wrap: normal;
}
.reveal pre.remaining-height code {
.reveal pre.stretch code {
height: 100%;
max-height: 100%;
@ -355,7 +355,7 @@ body {
vertical-align: top;
}
.reveal .remaining-height {
.reveal .stretch {
max-width: none;
max-height: none;
}

2
css/reveal.min.css

File diff suppressed because one or more lines are too long

10
js/reveal.js

@ -1001,6 +1001,9 @@ var Reveal = (function(){
slideHeight = config.height,
slidePadding = 20; // TODO Dig this out of DOM
// Layout the contents of the slides
layoutSlideContents( config.width, config.height, slidePadding );
// Slide width may be a percentage of available width
if( typeof slideWidth === 'string' && /%$/.test( slideWidth ) ) {
slideWidth = parseInt( slideWidth, 10 ) / 100 * availableWidth;
@ -1014,9 +1017,6 @@ var Reveal = (function(){
dom.slides.style.width = slideWidth + 'px';
dom.slides.style.height = slideHeight + 'px';
// Layout the contents of the slides
layoutSlideContents( config.width, config.height, slidePadding );
// Determine scale of content to fit within available space
scale = Math.min( availableWidth / slideWidth, availableHeight / slideHeight );
@ -1073,8 +1073,8 @@ var Reveal = (function(){
*/
function layoutSlideContents( width, height, padding ) {
// Handle sizing of elements with the 'remaining-height' class
toArray( dom.slides.querySelectorAll( 'section > .remaining-height' ) ).forEach( function( element ) {
// Handle sizing of elements with the 'stretch' class
toArray( dom.slides.querySelectorAll( 'section > .stretch' ) ).forEach( function( element ) {
// Determine how much vertical space we can use
var remainingHeight = getRemainingHeight( element, ( height - ( padding * 2 ) ) );

4
js/reveal.min.js

File diff suppressed because one or more lines are too long
Loading…
Cancel
Save