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 = {
round = true
}
var values = []
var available_axes = Axis.prototype.available()
for (var a = 0; a < axes.length; a++) {
var axe = axes[a]
......@@ -1836,8 +1835,8 @@ Clone.prototype = {
if (axe == undefined || naxe == undefined){
console.default.error("Getter: not axis " + axe + "; ("+naxe+")")
}
if (available_axes.indexOf(naxe) != -1 ) {
var axis_p = Axis.prototype.getAxisProperties(naxe)
if (this.m.available_axes.indexOf(naxe) != -1 ) {
var axis_p = AXIS_DEFAULT[naxe]
var value = axis_p.fct(this, timepoint)
values.push( value )
} else {
......
......@@ -63,8 +63,8 @@ function Model() {
this.NORM_EXPECTED = "expected"
this.NORM_EXTERNAL = "external"
this.normalization_mode = this.NORM_FALSE
//this.axes = new Axes(this)
//this.available_axes = this.axes.available()
this.axes = new Axis(this)
this.available_axes = this.axes.available()
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