From 902b6d7df4ff0cff70be4caa676b618b1c0b6023 Mon Sep 17 00:00:00 2001 From: Piers Harding Date: Mon, 1 Aug 2011 16:26:43 +1200 Subject: [PATCH] MDL-27876 SCORM auto-adjust the stage height --- mod/scorm/module.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/mod/scorm/module.js b/mod/scorm/module.js index f1db6ecb4b7..b06cd017ca9 100644 --- a/mod/scorm/module.js +++ b/mod/scorm/module.js @@ -190,6 +190,16 @@ M.mod_scorm.init = function(Y, hide_nav, hide_toc, toc_title, window_name, launc } scorm_layout_widget.setStyle('height', '100%'); + var center = scorm_layout_widget.getUnitByPosition('center'); + center.setStyle('height', '100%'); + + // calculate the rough new height + newheight = YAHOO.util.Dom.getViewportHeight() *.82; + if (newheight < 600) { + newheight = 600; + } + scorm_layout_widget.set('height', newheight); + scorm_layout_widget.render(); scorm_resize_frame();