Skip to content

Commit

Permalink
Use monaco's resizing. Might help with #106 but then again maybe not
Browse files Browse the repository at this point in the history
  • Loading branch information
mattgodbolt committed Nov 2, 2024
1 parent 602becf commit e530189
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 10 deletions.
6 changes: 0 additions & 6 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
"jsbeeb": "github:mattgodbolt/jsbeeb#636f0b9e7668e2a1eaf45b7b1967ff9a045f66cc",
"monaco-editor": "^0.52.0",
"promise": "^8.3.0",
"resize-observer-polyfill": "^1.5.1",
"underscore": "^1.13.7",
"webgl-debug": "^2.0.1"
},
Expand Down
4 changes: 1 addition & 3 deletions src/owlet.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import {encode} from "base2048";
import tokenise from "jsbeeb/basic-tokenise";
import "./owlet-editor.less";
import {getWarnings} from "./bbcbasic";
import ResizeObserver from "resize-observer-polyfill";
import {makeUEF} from "./UEF";
import {AcornDFSdisc} from "./DFS";

Expand Down Expand Up @@ -57,6 +56,7 @@ export class OwletEditor {
scrollBeyondLastLine: false,
wordWrap: "on",
lineDecorationsWidth: 0,
automaticLayout: true,
});

this.editor.addAction({
Expand Down Expand Up @@ -88,8 +88,6 @@ export class OwletEditor {
});

this.emulator = new Emulator($("#emulator"));
this.observer = new ResizeObserver(() => this.editor.layout());
this.observer.observe(editorPane.parent()[0]);

this.examples = {};
for (const example of Examples.examples) this.addExample(example);
Expand Down

0 comments on commit e530189

Please sign in to comment.