8000 Editor now fills window. · vpython/flaskHost@4a6a958 · GitHub
[go: up one dir, main page]

Skip to content 8000

Commit 4a6a958

Browse files
committed
Editor now fills window.
1 parent f3bdd92 commit 4a6a958

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

src/ide.js

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1633,9 +1633,16 @@ $(function () {
16331633
} else {
16341634
var editor = monaco.editor.create(document.getElementById('editorContainer'), {
16351635
language: 'python',
1636-
value: progData.source
1636+
value: progData.source,
16371637
});
1638-
1638+
editor.layout({width: window.innerWidth, height: window.innerHeight})
1639+
1640+
window.onresize = () => {
1641+
var w = window.innerWidth;
1642+
var h = window.innerHeight;
1643+
editor.layout({width: w, height: h});
1644+
};
1645+
16391646
if (isWritable) {
16401647
var save = saver( {user:username, folder:folder, program:program},
16411648
function () { return editor.getValue() },
@@ -1651,6 +1658,7 @@ $(function () {
16511658
}
16521659
)}
16531660

1661+
16541662
function iframefix() {
16551663
// When a mouse operation is started outside an iframe, cover all iframes on the page so
16561664
// that mousemove events don't get eaten by them. Supposedly jquery UI 1.9 will have this
@@ -1675,6 +1683,5 @@ $(function () {
16751683
})
16761684
}
16771685
iframefix()
1678-
16791686
window.onhashchange()
16801687
})

0 commit comments

Comments
 (0)
0