MDL-27876 SCORM auto-adjust the stage height

This commit is contained in:
Piers Harding
2011-08-02 17:13:37 +12:00
committed by Dan Marsden
parent 0c566ce339
commit 189bdcf125
+10
View File
@@ -186,6 +186,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();