Commit e7c1718e authored by Marc Duez's avatar Marc Duez

model.js : display_top show number of clones currently displayed

parent bcd6101b
......@@ -177,7 +177,7 @@
<div class="menu" id="filter_menu" onmouseover="showSelector('filterSelector');" > filter
<div id="filterSelector" class="selector"><div>
<div class="menu_box">
number of clones</br>
<span id="top_label"></span></br>
<input id="top_slider" type="range" min="5" max="100" step="5" value="10" onchange="m.displayTop(this.value)" />
</div>
<div class="menu_box">
......
......@@ -1703,10 +1703,20 @@ Model.prototype = {
top = typeof top !== 'undefined' ? top : this.top;
this.top = top;
var html_container = document.getElementById('top_slider');
if (html_container != null) {
html_container.value = top;
var html_slider = document.getElementById('top_slider');
if (html_slider != null) {
html_slider.value = top;
}
var html_label = document.getElementById('top_label');
if (html_label != null) {
var count = 0;
for (var i=0; i<this.windows.length; i++){
if (this.windows[i].top <= top) count++;
}
html_label.innerHTML = count + ' clones (top ' + top + ')' ;
}
this.update();
},
......
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