Skip to content

Commit d763387

Browse files
committed
Use new editor
1 parent 22c28c3 commit d763387

File tree

2 files changed

+17
-8
lines changed

2 files changed

+17
-8
lines changed

src/components/Editor.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ export default function Editor({
3535
return (
3636
<div
3737
style={{
38-
width: "100vw",
39-
height: "100vh",
38+
width: "100%",
39+
height: "100%",
4040
}}
4141
ref={div => {
4242
if (!div) {

src/components/SplitEditor.tsx

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@ import SplitPane from "react-split-pane";
55

66
import { getSplitConfig, saveSplitConfig } from "../config.js";
77
import type { SupportedEngine, SupportedFormat } from "../rendering.js";
8-
import EditorPane from "./EditorPane.js";
8+
import Editor from "./Editor.js";
9+
import type EditorPane from "./EditorPane.js";
910
import GraphPane from "./GraphPane.js";
1011

1112
type ErrorList = monaco.editor.IMarkerData[];
@@ -74,6 +75,15 @@ export default class SplitEditor extends Component<
7475

7576
const dotSrc = this.#getDotSrcToRender();
7677

78+
/*
79+
<EditorPane
80+
ref={this.#editorPaneRef}
81+
defaultValue={s.dotSrc}
82+
onChangeValue={this.dotSourceChanged}
83+
onValueError={this.dotSourceErrored}
84+
/>
85+
*/
86+
7787
return (
7888
<SplitPane
7989
split="vertical"
@@ -84,11 +94,10 @@ export default class SplitEditor extends Component<
8494
{...({} as any)}
8595
>
8696
<ErrorBoundary fallback="Could not load editor">
87-
<EditorPane
88-
ref={this.#editorPaneRef}
89-
defaultValue={s.dotSrc}
90-
onChangeValue={this.dotSourceChanged}
91-
onValueError={this.dotSourceErrored}
97+
<Editor
98+
initialValue={s.dotSrc}
99+
onChangeValue={() => []}
100+
onValueError={n => void n}
92101
/>
93102
</ErrorBoundary>
94103
<ErrorBoundary fallback="Could not load graph preview">

0 commit comments

Comments
 (0)