Browse files

MDL-27876 SCORM auto-adjust the stage height

  • Loading branch information...
1 parent e8e1ad9 commit 902b6d7df4ff0cff70be4caa676b618b1c0b6023 @piersharding piersharding committed with danmarsden Aug 1, 2011
Showing with 10 additions and 0 deletions.
  1. +10 −0 mod/scorm/module.js
View
10 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();

0 comments on commit 902b6d7

Please sign in to comment.