Skip to content

Commit

Permalink
Merge pull request #623 from Happytofu/master
Browse files Browse the repository at this point in the history
[frontend] made console bigger when in vertical mode
  • Loading branch information
e45lee committed Jan 24, 2017
2 parents bbb1123 + 87dffb0 commit f55e4de
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/frontend/frontend/file.js
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ angular.module('frontend-app')
// Resize on window size change
function onResize() {
var narrow = (settings.settings.force_narrow || $window.innerWidth < 992);
var min_height = 500, margin_bottom = 30;
var min_height = 750, margin_bottom = 30;
var editor_elem = $window.document.querySelector("#editor > .CodeMirror");
var console_elem = $window.document.querySelector("#console > .CodeMirror");
// Run only when DOM is ready.
Expand All @@ -121,10 +121,10 @@ angular.module('frontend-app')
var console_input_height = $window.document.querySelector('#console-input').offsetHeight;
if (editor_elem)
editor_elem.style.height = sprintf("%fpx",
(narrow ? target_height * 0.7 : target_height) - file_control_height);
(narrow ? target_height * 0.5 : target_height) - file_control_height);
if (console_elem)
console_elem.style.height = sprintf("%fpx",
(narrow ? (target_height * 0.3 - file_control_height) : target_height) - console_input_height);
(narrow ? (target_height * 0.5 - file_control_height) : target_height) - console_input_height);
if(self.editor)
self.editor.refresh();
if(self.consoleEditor)
Expand Down

0 comments on commit f55e4de

Please sign in to comment.