Commit 92594e8b authored by Marc Duez's avatar Marc Duez Committed by Mathieu Giraud
Browse files

builder.js : add an html input to tagSelector to change normalization (beta)

- click on a clone star icon to open tagSelector
- input expected value for normalization
- click normalize
- magic happens
parent 4f593284
......@@ -142,7 +142,43 @@ Builder.prototype = {
listTag.appendChild(li);
})(i)
}
var span1 = document.createElement('span');
span1.appendChild(document.createTextNode("expected size : "))
var span2 = document.createElement('span');
var input = document.createElement('input');
input.type = "number";
input.step = "0.0001"
input.id = "normalized_size";
span2.appendChild(input)
var span3 = document.createElement('span');
span3.appendChild(document.createTextNode("normalize"))
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')
}
var div = document.createElement('div');
div.appendChild(span1)
div.appendChild(span2)
div.appendChild(span3)
var li = document.createElement('li');
li.appendChild(div)
listTag.appendChild(li);
},
/*
......
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