Commit 55eda178 authored by flothoni's avatar flothoni

model.js & clone.js; don't instantiate Axis object each time

Link to #4347
parent dd92fbb3
Pipeline #151439 passed with stages
in 14 minutes and 43 seconds
...@@ -1828,7 +1828,6 @@ Clone.prototype = { ...@@ -1828,7 +1828,6 @@ Clone.prototype = {
round = true round = true
} }
var values = [] var values = []
var available_axes = Axis.prototype.available()
for (var a = 0; a < axes.length; a++) { for (var a = 0; a < axes.length; a++) {
var axe = axes[a] var axe = axes[a]
...@@ -1836,8 +1835,8 @@ Clone.prototype = { ...@@ -1836,8 +1835,8 @@ Clone.prototype = {
if (axe == undefined || naxe == undefined){ if (axe == undefined || naxe == undefined){
console.default.error("Getter: not axis " + axe + "; ("+naxe+")") console.default.error("Getter: not axis " + axe + "; ("+naxe+")")
} }
if (available_axes.indexOf(naxe) != -1 ) { if (this.m.available_axes.indexOf(naxe) != -1 ) {
var axis_p = Axis.prototype.getAxisProperties(naxe) var axis_p = AXIS_DEFAULT[naxe]
var value = axis_p.fct(this, timepoint) var value = axis_p.fct(this, timepoint)
values.push( value ) values.push( value )
} else { } else {
......
...@@ -63,8 +63,8 @@ function Model() { ...@@ -63,8 +63,8 @@ function Model() {
this.NORM_EXPECTED = "expected" this.NORM_EXPECTED = "expected"
this.NORM_EXTERNAL = "external" this.NORM_EXTERNAL = "external"
this.normalization_mode = this.NORM_FALSE this.normalization_mode = this.NORM_FALSE
//this.axes = new Axes(this) this.axes = new Axis(this)
//this.available_axes = this.axes.available() this.available_axes = this.axes.available()
setInterval(function(){return self.updateIcon()}, 100); setInterval(function(){return self.updateIcon()}, 100);
} }
......
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