Skip to content

Commit

Permalink
Numerous improvements to mappings UI
Browse files Browse the repository at this point in the history
  • Loading branch information
Lorp committed May 29, 2024
1 parent dd1c903 commit 1c7ceb7
Show file tree
Hide file tree
Showing 2 changed files with 123 additions and 61 deletions.
31 changes: 19 additions & 12 deletions src/fencer.html
Original file line number Diff line number Diff line change
Expand Up @@ -183,17 +183,26 @@
display: grid;
grid-template-columns: 40px 10px 1fr 10px;
grid-template-rows: 40px 10px 1fr 10px 80px;
background-color: #eee;
}
.svg-container { /* this contains the SVG element */
position: relative;
}
#mappings-visual { /* this is the SVG element */
background-color: #eee;
width: 100%;
height: 100%;
position: absolute;
width: calc(100% + 20px);
height: calc(100% + 20px);
left: -10px;
top: -10px;
}
.ruler {
background-color: #ccc;
position: relative;
color: black;
font-size: 0.8em;
}
.extra {
background-color: white;
}
}

.window.mappings {
Expand Down Expand Up @@ -227,6 +236,9 @@
.zoom {
font-family: Material Symbols Outlined;
}
details[open] {
background-color: #bad5fe;
}
}

.window.renders {
Expand Down Expand Up @@ -335,10 +347,6 @@
display: none;
}

.mappings details[open] {
background-color: #bad5fe;
}

input.numeric {
font-weight: bold;
width: calc(100% - 7px);
Expand All @@ -349,9 +357,9 @@
color: grey;
}


</style>


<!-- Google Fonts preconnect -->
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
Expand Down Expand Up @@ -393,9 +401,9 @@ <h2>Mappings</h2>

<div class="content">

<div></div><div></div><div class="ruler horizontal">Ruler</div><div></div>
<div></div><div></div><div class="ruler horizontal"></div><div></div>
<div></div><div></div><div></div><div></div>
<div class="ruler vertical">R</div><div></div>
<div class="ruler vertical"></div><div></div>
<div class="svg-container"></div>
<div></div>
<div></div><div></div><div></div><div></div>
Expand All @@ -416,7 +424,6 @@ <h2>Mappings</h2>
<br>
<label for="integer-snapping">Snap to integers</label> <input type="checkbox" id="integer-snapping">


<div id="mappings-ui-info">
<div id="coords"></div>
</div>
Expand Down
Loading

0 comments on commit 1c7ceb7

Please sign in to comment.