diff --git a/index.html b/index.html index 9efa8fe..b14afc4 100644 --- a/index.html +++ b/index.html @@ -17,7 +17,7 @@ Controls -
+
diff --git a/src/editor/GraphEditor.ts b/src/editor/GraphEditor.ts index be2c6c4..3c9cecd 100644 --- a/src/editor/GraphEditor.ts +++ b/src/editor/GraphEditor.ts @@ -464,6 +464,14 @@ export class GraphEditor extends HTMLElement { private fireOnChange() { this.dispatchEvent(new Event('change')); } + + override get clientWidth(): number { + return this.children[0].clientWidth; + } + + override get clientHeight(): number { + return this.children[0].clientHeight; + } } type NodeSelection = d3.Selection< diff --git a/src/style.css b/src/style.css index 53f8701..ab7da22 100644 --- a/src/style.css +++ b/src/style.css @@ -24,10 +24,13 @@ h1 { } #app { - max-width: 1280px; - margin: 0 auto; - padding: 2rem; - text-align: center; + display: flex; + flex-direction: column; + min-height: 100vh; +} + +#app[hidden] { + display: none; } .input { @@ -36,6 +39,9 @@ h1 { justify-content: center; margin-bottom: 0.5em; } +.current-word { + padding-top: 2rem; +} input { padding: 0.3em 0.5em; font-size: 1.1em; @@ -108,9 +114,8 @@ button:focus-visible { background-color: #3a3a3a; } -graph-editor { - display: block; - height: 600px; +#state-graph { + flex-grow: 1; } .link {