Commit 7f786c81 authored by Marc Duez's avatar Marc Duez

builder.js/axis.js : use clone object

parent 6a4d3356
......@@ -64,7 +64,7 @@ Axis.prototype = {
//clone position
this.pos = function(cloneID) {
var clone = self.m.windows[cloneID]
var clone = self.m.clone(cloneID)
if (typeof clone[geneType] != "undefined"
&& typeof clone[geneType][0] != "undefined"
&& typeof gene_list[clone[geneType][0].split("*")[0]] != "undefined")
......
......@@ -112,10 +112,10 @@ Builder.prototype = {
normalize_list.appendChild(document.createTextNode("none"))
normalize_list.appendChild(document.createElement("br"))
for (var i=0; i<self.m.windows.length; i++){
if (typeof self.m.windows[i].expected != "undefined"){
for (var i=0; i<self.m.n_windows; i++){
if (typeof self.m.clone(i).expected != "undefined"){
var input = document.createElement("input")
var text = document.createTextNode(self.m.getName(i) + " => " +self.m.windows[i].expected)
var text = document.createTextNode(self.m.clone(i).getName() + " => " +self.m.clone(i).expected)
input.value=i;
input.type = "radio"
input.name = "normalize_list"
......@@ -156,7 +156,7 @@ Builder.prototype = {
span1.className = "tagColorBox tagColor" + i
span1.onclick = function () {
var cloneID = parseInt(document.getElementById('tag_id').innerHTML);
self.m.changeTag(cloneID, i)
self.m.clone(cloneID).changeTag(i)
$('#tagSelector').hide('fast')
}
......@@ -164,7 +164,7 @@ Builder.prototype = {
span2.className = "tagName" + i + " tn"
span2.onclick = function () {
var cloneID = parseInt(document.getElementById('tag_id').innerHTML);
self.m.changeTag(cloneID, i)
self.m.clone(cloneID).changeTag(i)
$('#tagSelector').hide('fast')
}
......@@ -203,7 +203,7 @@ Builder.prototype = {
if (size>0 && size<1){
document.getElementById('normalized_size').value = ""
self.m.windows[cloneID].expected=size;
self.m.clone(cloneID).expected=size;
self.m.compute_normalization(cloneID, size)
self.m.update()
$('#tagSelector')
......@@ -357,9 +357,9 @@ Builder.prototype = {
//init slider
var max_top = 0;
for (var i = 0; i < this.m.windows.length; i++) {
if (this.m.windows[i].top > max_top)
max_top = this.m.windows[i].top
for (var i = 0; i < this.m.n_windows; i++) {
if (this.m.clone(i).top > max_top)
max_top = this.m.clone(i).top
}
max_top = (Math.ceil(max_top / 5)) * 5
document.getElementById("top_slider")
......
......@@ -182,7 +182,7 @@ Clone.prototype = {
newTag = newTag.replace("tag", "");
myConsole.log("changeTag() (clone " + this.hash + " <<" + newTag + ")");
this.tag = newTag;
this.updateElem([this.m.hash]);
this.m.updateElem([this.m.hash]);
},
/* return clone name
......
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