Show More
@@ -2,6 +2,7 b'' | |||||
2 | // Distributed under the terms of the Modified BSD License. |
|
2 | // Distributed under the terms of the Modified BSD License. | |
3 |
|
3 | |||
4 | require([ |
|
4 | require([ | |
|
5 | 'jquery', | |||
5 | 'base/js/namespace', |
|
6 | 'base/js/namespace', | |
6 | 'base/js/utils', |
|
7 | 'base/js/utils', | |
7 | 'base/js/page', |
|
8 | 'base/js/page', | |
@@ -14,6 +15,7 b' require([' | |||||
14 | 'edit/js/notificationarea', |
|
15 | 'edit/js/notificationarea', | |
15 | 'custom/custom', |
|
16 | 'custom/custom', | |
16 | ], function( |
|
17 | ], function( | |
|
18 | $, | |||
17 | IPython, |
|
19 | IPython, | |
18 | utils, |
|
20 | utils, | |
19 | page, |
|
21 | page, | |
@@ -75,4 +77,14 b' require([' | |||||
75 | } |
|
77 | } | |
76 | }; |
|
78 | }; | |
77 |
|
79 | |||
|
80 | // Make sure the codemirror editor is sized appropriatley. | |||
|
81 | var _handle_resize = function() { | |||
|
82 | var header = $('#header'); | |||
|
83 | var padding = header.outerHeight(true) - header.innerHeight(); | |||
|
84 | $('div.CodeMirror').height(window.innerHeight - header.height() - 2*padding); | |||
|
85 | }; | |||
|
86 | window.onresize = _handle_resize; | |||
|
87 | ||||
|
88 | // On document ready, resize codemirror. | |||
|
89 | $(_handle_resize); | |||
78 | }); |
|
90 | }); |
General Comments 0
You need to be logged in to leave comments.
Login now