Skip to content
Browse files

Merge branch 'm21_MDL-32388' of git://github.com/danmarsden/moodle in…

…to MOODLE_21_STABLE
  • Loading branch information...
2 parents 0eeb087 + 133e7f3 commit 50ff77d26a68250865776d42c71a3be3760d0572 Sam Hemelryk committed Apr 16, 2012
Showing with 8 additions and 7 deletions.
  1. +8 −7 mod/scorm/player.js
View
15 mod/scorm/player.js
@@ -1,4 +1,12 @@
function scorm_openpopup(url,name,options,width,height) {
+ if (width<=100) {
+ width = Math.round(screen.availWidth * width / 100);
+ }
+ if (height<=100) {
+ height = Math.round(screen.availHeight * height / 100);
+ }
+ options += ",width="+width+",height="+height;
+
windowobj = window.open(url,name,options);
if (!windowobj) {
return;
@@ -7,13 +15,6 @@ function scorm_openpopup(url,name,options,width,height) {
// Fullscreen
windowobj.moveTo(0,0);
}
- if (width<=100) {
- width = Math.round(screen.availWidth * width / 100);
- }
- if (height<=100) {
- height = Math.round(screen.availHeight * height / 100);
- }
- windowobj.resizeTo(width,height);
windowobj.focus();
return windowobj;
}

0 comments on commit 50ff77d

Please sign in to comment.
Something went wrong with that request. Please try again.