diff --git a/static/js/record.js b/static/js/record.js index 2df8fe352..423211edc 100644 --- a/static/js/record.js +++ b/static/js/record.js @@ -102,10 +102,9 @@ NgApp.controller('TerminalRecordCtrl', function ($scope, $http) { timer = setInterval(advance, TICK); }; - var rc = textSize(); var term = new Terminal({ - rows: rc.y, - cols: rc.x, + rows: 80, + cols: 24, useStyle: true, screenKeys: true }); @@ -121,37 +120,4 @@ NgApp.controller('TerminalRecordCtrl', function ($scope, $http) { timer = setInterval(advance, TICK); }) -}) - -function textSize() { - var charSize = getCharSize(); - var windowSize = getwindowSize(); - var size = { - x: Math.floor(windowSize.width / charSize.width) - , y: Math.floor(windowSize.height / charSize.height) - }; - if (size.x > 150)size.x = 150; - if (size.y > 35)size.y = 35; - size.x = 140; - size.y = 30; - return size; -} -function getCharSize() { - var $span = $("", {text: "qwertyuiopasdfghjklzxcvbnm"}); - $('body').append($span); - var size = { - width: $span.outerWidth() / 30 - , height: $span.outerHeight() * 1.1 - }; - $span.remove(); - return size; -} -function getwindowSize() { - var e = window, - a = 'inner'; - if (!('innerWidth' in window )) { - a = 'client'; - e = document.documentElement || document.body; - } - return {width: e[a + 'Width'] - 300, height: e[a + 'Height'] - 120}; -} +}) \ No newline at end of file