Commit f6ae4c6d authored by Marc Duez's avatar Marc Duez
Browse files

builder.js : improve normalization button + check value

parent 8671da93
......@@ -502,6 +502,10 @@ max-height: calc(~"100%" - @margin)
margin-top: 2px;
}
#normalized_size {
width: 80px;
}
/*menu*/
.menu{
......
......@@ -168,18 +168,24 @@ Builder.prototype = {
span2.appendChild(input)
var span3 = document.createElement('span');
span3.appendChild(document.createTextNode("normalize"))
var span3 = document.createElement('button');
span3.appendChild(document.createTextNode("ok"))
span3.onclick = function () {
var cloneID = parseInt(document.getElementById('tag_id')
.innerHTML);
var size = parseFloat(document.getElementById('normalized_size').value);
document.getElementById('normalized_size').value = ""
self.m.norm = true
self.m.compute_normalization(cloneID, size)
self.m.update()
$('#tagSelector')
.hide('fast')
if (size>0 && size<1){
document.getElementById('normalized_size').value = ""
self.m.norm = true
self.m.compute_normalization(cloneID, size)
self.m.update()
$('#tagSelector')
.hide('fast')
}else{
popupMsg("expected input between 0.0001 and 1")
}
}
var div = document.createElement('div');
......
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