From 3c5f3ee048b826f45844173f2ebcc1285263583c Mon Sep 17 00:00:00 2001 From: Hakim El Hattab Date: Sat, 17 Aug 2013 12:15:55 -0400 Subject: fix retrieval of computed styles in ff --- js/reveal.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'js/reveal.js') diff --git a/js/reveal.js b/js/reveal.js index 53428aa..cf9df15 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -743,8 +743,8 @@ var Reveal = (function(){ if( typeof sibling.offsetHeight === 'number' && sibling !== element ) { var styles = window.getComputedStyle( sibling ), - marginTop = parseInt( styles[ 'margin-top' ], 10 ), - marginBottom = parseInt( styles[ 'margin-bottom' ], 10 ); + marginTop = parseInt( styles.marginTop, 10 ), + marginBottom = parseInt( styles.marginBottom, 10 ); height -= sibling.offsetHeight + marginTop + marginBottom; @@ -755,8 +755,8 @@ var Reveal = (function(){ var elementStyles = window.getComputedStyle( element ); // Subtract the margins of the target element - height -= parseInt( elementStyles[ 'margin-top' ], 10 ) + - parseInt( elementStyles[ 'margin-bottom' ], 10 ); + height -= parseInt( elementStyles.marginTop, 10 ) + + parseInt( elementStyles.marginBottom, 10 ); } -- cgit v1.2.3