@@ -448,9 +448,7 @@ var helloEditor = {
448
448
refreshUI : function ( ) {
449
449
450
450
var viewportWidth = $ ( "#interface" ) . innerWidth ( ) ,
451
- viewportHeight = $ ( "#interface" ) . innerHeight ( ) - $ ( "#header" ) . height ( ) - $ ( "#footer" ) . height ( ) ,
452
- minVideoWidth = 320 ,
453
- maxVideoWidth = viewportWidth / 2 ,
451
+ viewportHeight = $ ( "#interface" ) . innerHeight ( ) ,
454
452
videoWidth ,
455
453
videoHeight ;
456
454
@@ -482,15 +480,10 @@ var helloEditor = {
482
480
helloEditor . confirmExit = true ;
483
481
484
482
$ ( "#interface" ) . removeClass ( "videoMode" ) ;
485
- //console.log("Editor Mode");
486
483
487
- if ( viewportWidth - viewportHeight < minVideoWidth ) {
488
- videoWidth = minVideoWidth ;
489
- } else if ( viewportWidth - viewportHeight > maxVideoWidth ) {
490
- videoWidth = maxVideoWidth ;
491
- } else {
492
- videoWidth = viewportWidth - viewportHeight ;
493
- }
484
+ videoWidth = viewportWidth - 500 ;
485
+
486
+ if ( videoWidth > viewportWidth / 2 ) { videoWidth = viewportWidth / 2 ; }
494
487
495
488
videoHeight = videoWidth / 16 * 9 ;
496
489
@@ -499,21 +492,21 @@ var helloEditor = {
499
492
500
493
$ ( "#videoContainer" )
501
494
. css ( {
502
- width : videoWidth ,
495
+ width : videoWidth - 8 ,
503
496
height : videoHeight ,
504
497
left : 8 ,
505
- top : 8 + $ ( "#header" ) . height ( ) ,
498
+ top : $ ( "#header" ) . height ( ) + 8 ,
506
499
marginTop : 0 ,
507
500
marginLeft : 0
508
501
} )
509
502
. show ( ) ;
510
503
511
504
$ ( "#editorContainer" )
512
505
. css ( {
513
- width : videoWidth ,
514
- height : viewportHeight - videoHeight - 32 ,
515
- top : videoHeight + 20 + $ ( "#header" ) . height ( ) ,
516
- left : 8
506
+ top : $ ( "#header" ) . height ( ) + 8 + 8 + videoHeight ,
507
+ left : 8 ,
508
+ width : videoWidth - 8 ,
509
+ height : viewportHeight - $ ( "#header" ) . height ( ) - 8 - 8 - videoHeight - 8 - $ ( "#footer" ) . height ( )
517
510
} ) ;
518
511
519
512
$ ( "#editor" ) . height ( $ ( "#editorContainer" ) . height ( ) - $ ( "#editorCommands" ) . height ( ) - 8 ) ;
0 commit comments