interface improvements
Co-authored-by: Alex <AlexanderMcDowell@users.noreply.github.com>
This commit is contained in:
@@ -33,6 +33,14 @@ html {
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
#img-preview {
|
||||
width: 18rem;
|
||||
}
|
||||
|
||||
#pyro-eqn {
|
||||
width: 800px;
|
||||
}
|
||||
|
||||
.img-table-heading {
|
||||
padding: 4px 10px;
|
||||
}
|
||||
|
||||
11
static/img_preview.js
Normal file
11
static/img_preview.js
Normal file
@@ -0,0 +1,11 @@
|
||||
function setOnchange() {
|
||||
let imgPreview = document.getElementById('img-preview');
|
||||
let imgUpload = document.getElementById('img-upload');
|
||||
imgUpload.onchange = event => {
|
||||
const [file] = imgUpload.files;
|
||||
if (file) {
|
||||
console.log(file)
|
||||
imgPreview.src = URL.createObjectURL(file);
|
||||
}
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user