Commit f087af6e authored by flothoni's avatar flothoni

graph.js; filter non constant clones for graph usage

Link to #4026
parent 94686d8c
......@@ -381,11 +381,16 @@ Graph.prototype = {
var stack = new Stack(this.m)
stack.compute();
for (var i = 0; i < this.m.clones.length; i++) {
this.data_clone[i].path = this.constructStack(i, stack);
if (this.m.clone(i).hasSizeConstant()) {
this.data_clone[i].path = this.constructStack(i, stack);
}
}
}else{
var list = []
for (var j = 0; j < this.m.clones.length; j++) list.push(j)
for (var j = 0; j < this.m.clones.length; j++)
if (this.m.clone(j).hasSizeConstant()) {
list.push(j)
}
this.updateElem(list)
}
......@@ -775,11 +780,13 @@ Graph.prototype = {
this.data_clone = [];
for (var i = 0; i < this.m.clones.length; i++) {
if (this.m.clone(i).hasSizeConstant()) {
this.data_clone[i] = {
id: i,
name: "line" + i,
path: this.constructPath(i, false)
};
}
}
this.g_clone = this.clones_container.selectAll("path")
......@@ -967,8 +974,10 @@ Graph.prototype = {
//get ready for something really dirty
for (var i=0; i<this.m.samples.order.length; i++) {
for (var j=0; j<this.m.clones.length; j++){
if (this.m.clone(j).hasSizeConstant()) {
var size = this.m.precision*this.m.clone(j).getSize()
if (size>max) max=size;
}
}
}
......@@ -1404,7 +1413,11 @@ Stack.prototype = {
for (j=0; j<this.m.samples.number; j++){
this.total_size[j]=0
for (i=0; i<this.m.clones.length; i++){
if (this.m.clone(i).isActive()) this.total_size[j] += this.m.clone(i).getSize(j); //active clones
if (this.m.clone(i).hasSizeConstant()) {
if (this.m.clone(i).isActive()) {
this.total_size[j] += this.m.clone(i).getSize(j); //active clones
}
}
}
this.total_size[j] += this.m.clone(this.m.clones.length-1).getSize(j);//other clones
......@@ -1421,6 +1434,7 @@ Stack.prototype = {
}
for (i=0; i<this.m.clones.length; i++){
if (this.m.clone(i).hasSizeConstant()) {
this.min[i] = []
this.max[i] = []
//active clones
......@@ -1436,6 +1450,7 @@ Stack.prototype = {
this.max[i][j] = this.sum[j]
}
}
}
}
//other
......
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