Commit 51a452ed authored by Elijah Justin Medina's avatar Elijah Justin Medina
Browse files

minor redesigns

final commit unless deployed on nginx
parent 7dfe74ee
web/data/morph/morph_init.png

9.29 KB | W: | H:

web/data/morph/morph_init.png

7.96 KB | W: | H:

web/data/morph/morph_init.png
web/data/morph/morph_init.png
web/data/morph/morph_init.png
web/data/morph/morph_init.png
  • 2-up
  • Swipe
  • Onion skin
......@@ -68,8 +68,9 @@
float: left;
position: fixed;
height: 100%;
margin-left: 20px;
margin-top: 20px;
padding-left: 20px;
padding-top: 20px;
background-color:#d3af37;
}
#results {
......@@ -214,10 +215,6 @@
<input type="range" min="1" max="20" value="1" step="1" class="slider morph" id="morph">
<label for="morph-slider" style="float: right;">Radius (dilation): 1px</label>
</div>
<!-- <div id="dilateerode">
<input type="range" min="1" max="20" value="1" step="1" class="slider morph" id="dilation">
<label for="dilation-slider" style="float: right;">Radius (dilation): 1px</label>
</div> -->
<div class="threshold">
<div id="mask">
......@@ -290,17 +287,6 @@
)
}
// function dilateImage() {
// let rad = document.querySelector("input#dilation").value
// // console.log(rad)
// let selImg = document.querySelector("select#img").value
// fetch('/morph/dilation/'+selImg+'/'+rad).then(
// function (r){
// document.querySelector("img#morphed").src = "data/morph/morph_new_"+selImg.slice(0, -4)+ '-' + selImg.slice(selImg.length - 3)+"-" + rad + "-" + "dilation.png"
// }
// )
// }
function morphImageMask() {
let rad = document.querySelector("input#morph").value
let op = document.querySelector("select#dilateorerode").value
......@@ -310,34 +296,18 @@
}, 500);
}
// function dilateImageMask() {
// let rad = document.querySelector("input#dilation").value
// // console.log(rad)
// let selImg = document.querySelector("select#img").value
// setTimeout(function(){
// document.querySelector("img#morphed-masked").src = "data/masked_morphimg/morph_masked_"+selImg.slice(0, -4)+ '-' + selImg.slice(selImg.length - 3)+"-" + rad + "-" + "dilation.png"
// }, 500);
// }
function changeSliderDisplay() {
let rad = document.querySelector("input#morph").value
let op = document.querySelector("select#dilateorerode").value
document.querySelector("input#morph+label").innerText = "Radius (" + op + "): " + rad + "px"
}
// function changeRadiusDilation() {
// let rad = document.querySelector("input#dilation").value
// document.querySelector("input#dilation+label").innerText = "Radius (dilation): " + rad + "px"
// }
document.querySelector("button#get-mask").addEventListener("click", getMask)
document.querySelector("button#apply-mask").addEventListener("click", applyMask)
document.querySelector("input#morph").addEventListener("change", morphImage)
// document.querySelector("input#dilation").addEventListener("change", dilateImage)
document.querySelector("input#morph").addEventListener("change", morphImageMask)
// document.querySelector("input#dilation").addEventListener("change", dilateImageMask)
// document.querySelector("input#erosion").addEventListener("change", changeSliderDisplay)
document.querySelector("select#dilateorerode").addEventListener("change", changeSliderDisplay)
document.querySelector("input#morph").addEventListener("change", changeSliderDisplay)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment