Leaving a little more room beneath embedded object so it doesn't get cut off on some...
authorChris Scribner <scriby@gmail.com>
Mon, 10 Oct 2011 16:10:15 +0000 (12:10 -0400)
committerChris Scribner <scriby@gmail.com>
Mon, 7 Nov 2011 01:41:58 +0000 (20:41 -0500)
mod/lti/view.php

index 3ae2098..b4ab3cc 100644 (file)
@@ -142,6 +142,8 @@ if ( $launchcontainer == LTI_LAUNCH_CONTAINER_WINDOW ) {
 
                 var dom = YAHOO.util.Dom;
                 var frame = document.getElementById('contentframe');
+                
+                var padding = 15; //The bottom of the iframe wasn't visible on some themes. Probably because of border widths, etc.
 
                 var lastHeight;
 
@@ -149,7 +151,8 @@ if ( $launchcontainer == LTI_LAUNCH_CONTAINER_WINDOW ) {
                     var viewportHeight = dom.getViewportHeight();
 
                     if(lastHeight !== Math.min(dom.getDocumentHeight(), viewportHeight)){
-                        frame.style.height = viewportHeight - dom.getY(frame) + 'px';
+                        
+                        frame.style.height = viewportHeight - dom.getY(frame) - padding + 'px';
 
                         lastHeight = Math.min(dom.getDocumentHeight(), dom.getViewportHeight());
                     }