use static js
parent
dcf78bb88d
commit
fa1e988344
|
@ -1,11 +0,0 @@
|
||||||
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);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -0,0 +1,3 @@
|
||||||
|
function saveCsv(csvString) {
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,9 @@
|
||||||
|
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);
|
||||||
|
}
|
||||||
|
};
|
|
@ -2,6 +2,8 @@
|
||||||
<head>
|
<head>
|
||||||
<title>Pyrometry Application</title>
|
<title>Pyrometry Application</title>
|
||||||
<link rel="stylesheet" href="{{ url_for('static', filename='app.css') }}">
|
<link rel="stylesheet" href="{{ url_for('static', filename='app.css') }}">
|
||||||
|
{% block head %}
|
||||||
|
{% endblock %}
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div class="navbar">
|
<div class="navbar">
|
||||||
|
|
|
@ -1,4 +1,8 @@
|
||||||
{% extends "base.html" %}
|
{% extends "base.html" %}
|
||||||
|
|
||||||
|
{% block head %}
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<form action="/ratio_pyro" method="POST" enctype="multipart/form-data">
|
<form action="/ratio_pyro" method="POST" enctype="multipart/form-data">
|
||||||
<h2>Ratio Pyrometry Interface</h2>
|
<h2>Ratio Pyrometry Interface</h2>
|
||||||
|
@ -58,17 +62,7 @@
|
||||||
<input type="submit" value="Generate Heatmap"/>
|
<input type="submit" value="Generate Heatmap"/>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
<!-- <script src="/img_preview.js" onload="setOnChange()"></script> -->
|
<!-- Image Preview -->
|
||||||
<script>
|
<script src="/s/js/img_preview.js"></script>
|
||||||
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);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
</script>
|
|
||||||
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
|
@ -14,26 +14,25 @@
|
||||||
<label for="area_threshold">Area threshold (to remove dust particles) in px</label>
|
<label for="area_threshold">Area threshold (to remove dust particles) in px</label>
|
||||||
<input type="number" name="area_threshold" value="250"/>
|
<input type="number" name="area_threshold" value="250"/>
|
||||||
<br>
|
<br>
|
||||||
|
<br>
|
||||||
|
|
||||||
<label for="min_display_threshold">Minimum display threshold (in px)</label>
|
<label for="min_display_threshold">Minimum display threshold (in px)</label>
|
||||||
<input type="number" name="min_display_threshold" value="300"/>
|
<input type="number" name="min_display_threshold" value="300"/>
|
||||||
<br>
|
<br>
|
||||||
|
<br>
|
||||||
|
|
||||||
|
<label for="min_display_threshold">Page size</label>
|
||||||
|
<input type="number" name="paper_width" value="8.5"/>
|
||||||
|
X
|
||||||
|
<input type="number" name="paper_height" value="11"/> inches
|
||||||
|
<br>
|
||||||
|
<br>
|
||||||
|
|
||||||
<br>
|
<br>
|
||||||
<input type="submit" value="Generate Projected Sizes"/>
|
<input type="submit" value="Generate Projected Sizes"/>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
<!-- <script src="/img_preview.js" onload="setOnChange()"></script> -->
|
<!-- Image Preview -->
|
||||||
<script>
|
<script src="/s/js/img_preview.js"></script>
|
||||||
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);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
</script>
|
|
||||||
|
|
||||||
{% endblock %}
|
{% endblock %}
|
Loading…
Reference in New Issue