Make the editor use the remaining page height
continuous-integration/drone/push Build is passing Details

main
Clément FRÉVILLE 1 year ago
parent d9cd098b61
commit 57256c76ab

@ -17,7 +17,7 @@
<button id="back-button" data-i18n>Back</button> <button id="back-button" data-i18n>Back</button>
<a id="controls-button" class="button open-modal" href="#controls" data-i18n>Controls</a> <a id="controls-button" class="button open-modal" href="#controls" data-i18n>Controls</a>
</div> </div>
<div class="input"> <div class="input current-word">
<input type="text" id="word-input" autocapitalize="off" spellcheck="false" /> <input type="text" id="word-input" autocapitalize="off" spellcheck="false" />
<div id="light"></div> <div id="light"></div>
</div> </div>

@ -464,6 +464,14 @@ export class GraphEditor extends HTMLElement {
private fireOnChange() { private fireOnChange() {
this.dispatchEvent(new Event('change')); 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< type NodeSelection = d3.Selection<

@ -24,10 +24,13 @@ h1 {
} }
#app { #app {
max-width: 1280px; display: flex;
margin: 0 auto; flex-direction: column;
padding: 2rem; min-height: 100vh;
text-align: center; }
#app[hidden] {
display: none;
} }
.input { .input {
@ -36,6 +39,9 @@ h1 {
justify-content: center; justify-content: center;
margin-bottom: 0.5em; margin-bottom: 0.5em;
} }
.current-word {
padding-top: 2rem;
}
input { input {
padding: 0.3em 0.5em; padding: 0.3em 0.5em;
font-size: 1.1em; font-size: 1.1em;
@ -108,9 +114,8 @@ button:focus-visible {
background-color: #3a3a3a; background-color: #3a3a3a;
} }
graph-editor { #state-graph {
display: block; flex-grow: 1;
height: 600px;
} }
.link { .link {

Loading…
Cancel
Save