Skip to content

Commit a337ad9

Browse files
committed
woohoo #bugfix
1 parent 42890fe commit a337ad9

1 file changed

Lines changed: 16 additions & 1 deletion

File tree

‎v3/js/opt-office-mix.js‎

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,6 +251,12 @@ function officeMixEnterViewMode() {
251251
myVisualizer = null; // clear this before doing anything else, so
252252
// that we don't accidentally invalidate cache
253253
var savedAppState = _labViewer.components[0].component.data;
254+
255+
// very important so that trace cache can work when loading a saved Mix:
256+
if (_lastSavedAppState === undefined) {
257+
_lastSavedAppState = savedAppState;
258+
}
259+
254260
setToggleOptions(savedAppState);
255261
if (savedAppState.code) {
256262
pyInputSetValue(savedAppState.code);
@@ -282,6 +288,12 @@ function officeMixEnterEditMode() {
282288
myVisualizer = null; // clear this before doing anything else, so
283289
// that we don't accidentally invalidate cache
284290
var savedAppState = configuration.components[0].data;
291+
292+
// very important so that trace cache can work when loading a saved Mix:
293+
if (_lastSavedAppState === undefined) {
294+
_lastSavedAppState = savedAppState;
295+
}
296+
285297
setToggleOptions(savedAppState);
286298
if (savedAppState.code) {
287299
pyInputSetValue(savedAppState.code);
@@ -407,7 +419,10 @@ $(document).ready(function() {
407419
}
408420
});
409421

410-
initAceEditor(300);
422+
// TODO: in the future, make it flexible height but for now, just make
423+
// it fixed-height but kinda small-ish
424+
initAceEditor(200);
425+
pyInputAceEditor.setOptions({minLines: 12, maxLines: 1000});
411426

412427
// no frills footer
413428
$("#footer").css("margin-top", "0px")

0 commit comments

Comments
 (0)