Skip to content

Commit 9a6af1b

Browse files
committed
More sane layout model, sizing for iOS8
1 parent 1c325b0 commit 9a6af1b

File tree

2 files changed

+15
-18
lines changed

2 files changed

+15
-18
lines changed

css/main.scss

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55

66
$light-color: #FcFcFf;
77
$mid-color: #efefef;
8+
$dim-color: #cfcfcf;
89

910
$primary-color: #4D7E9E;
1011
$primary-color-dark: darken($primary-color, 20%);
@@ -263,7 +264,7 @@ div#lessonNavContainer {
263264
height: 100%;
264265

265266
min-width: 1024px;
266-
min-height: 492px;
267+
min-height: 704px;
267268
}
268269

269270
#interface.videoMode div#canvasContainer, #interface.videoMode div#editorContainer {
@@ -411,6 +412,7 @@ div#footer {
411412
width: 100%;
412413
min-width: 1024px;
413414
background: $light-color;
415+
border-top: 1px solid $dim-color;
414416
}
415417

416418
div#transport {
@@ -426,6 +428,7 @@ div#transport #track {
426428
background: $mid-color;
427429
height: 8px;
428430
width: 100%;
431+
outline: 1px solid $dim-color;
429432
}
430433

431434
div#transport #progress {
@@ -465,6 +468,7 @@ div.hint h2, div.hint p {
465468
div#editorContainer {
466469
display: none;
467470
position: absolute;
471+
overflow: hidden;
468472
top: 238px;
469473
left: 0px;
470474
padding: 8px;

js/editor.js

Lines changed: 10 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -448,9 +448,7 @@ var helloEditor = {
448448
refreshUI: function () {
449449

450450
var viewportWidth = $("#interface").innerWidth(),
451-
viewportHeight = $("#interface").innerHeight() - $("#header").height() - $("#footer").height(),
452-
minVideoWidth = 320,
453-
maxVideoWidth = viewportWidth / 2,
451+
viewportHeight = $("#interface").innerHeight(),
454452
videoWidth,
455453
videoHeight;
456454

@@ -482,15 +480,10 @@ var helloEditor = {
482480
helloEditor.confirmExit = true;
483481

484482
$("#interface").removeClass("videoMode");
485-
//console.log("Editor Mode");
486483

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; }
494487

495488
videoHeight = videoWidth / 16 * 9;
496489

@@ -499,21 +492,21 @@ var helloEditor = {
499492

500493
$("#videoContainer")
501494
.css({
502-
width: videoWidth,
495+
width: videoWidth - 8,
503496
height: videoHeight,
504497
left: 8,
505-
top: 8 + $("#header").height(),
498+
top: $("#header").height() + 8,
506499
marginTop: 0,
507500
marginLeft: 0
508501
})
509502
.show();
510503

511504
$("#editorContainer")
512505
.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()
517510
});
518511

519512
$("#editor").height($("#editorContainer").height() - $("#editorCommands").height() - 8);

0 commit comments

Comments
 (0)