Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added labels to form elements #1026

Merged
merged 2 commits into from
Aug 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions apps/segment/segment.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,12 +73,12 @@ async function initUIcomponents() {
<form class="form-style" action="#">
<ul>
<li>
<label align="left"> Name: </label>
<label for="name" align="left"> Name: </label>
<input name="name" id="name" type="text" required />
<span> Name of the model </span>
</li>
<li>
<label align="left"> Input patch size: </label>
<label for="imageSize" align="left"> Input patch size: </label>
<input name="imageSize" id="imageSize" type="number" required />
<span> The image size on which the model is trained (y x y)</span>
</li>
Expand All @@ -100,8 +100,8 @@ async function initUIcomponents() {

<label class="switch"><input type="checkbox" id="togBtn"><div class="slider"></div></label> <br> <br>
<div class="checkfalse"><div>Select model.json first followed by the weight binaries.</div> <br>
<input name="filesupload" id="modelupload" type="file" required/><br><br>
<input name="filesupload" id="weightsupload" type="file" multiple="" required/> <br> <br> </div>
<input name="filesupload" id="modelupload" type="file" aria-label="Upload model" required/><br><br>
<input name="filesupload" id="weightsupload" type="file" multiple="" aria-label="Upload weights" required/> <br> <br> </div>
<div class="checktrue" > URL to the ModelAndWeightsConfig JSON describing the model. <br> <br>
<label align-"left"> Enter the URL: </label> <input type="url" name="url" id="url" required> <br><br></div>
<button id="submit">Upload</button> <span id="status"></span>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -257,14 +257,14 @@
this.zoomIn.classList.add('material-icons');
this.zoomIn.classList.add('md-24');
this.zoomIn.classList.add('zoom');
this.zoomIn.textContent = 'add';
this.zoomIn.textContent = 'zoom_in';

// zoom out
this.zoomOut = document.createElement( 'div' );
this.zoomOut.classList.add('material-icons');
this.zoomOut.classList.add('md-24');
this.zoomOut.classList.add('zoom');
this.zoomOut.textContent = 'remove';
this.zoomOut.textContent = 'zoom_out';

// indicator
this.idx = document.createElement( 'div' );
Expand All @@ -277,6 +277,7 @@
this.ip = document.createElement('input');
this.ip.type='text';
this.ip.classList.add('ip');
this.ip.setAttribute('aria-label', 'Zoom level');
this.idx.addEventListener('click', function(e){
// set image zoom value to input
let value = this.txt.textContent;
Expand Down Expand Up @@ -306,6 +307,7 @@
// range
this.range = $.makeNeutralElement( 'input' );
this.range.type = 'range';
this.range.setAttribute('aria-label', 'Zoom level range');

this.element.appendChild(this.zoomIn);
this.element.appendChild(this.range);
Expand Down
Loading