Commit 400c513c authored by Mathieu Giraud's avatar Mathieu Giraud
Browse files

Merge branch 'feature-c/4077' into 'dev'

clones.js : fix clones distribution loading time issue

See merge request !595
parents 48bf444e 4cbd38c5
Pipeline #116471 passed with stages
in 7 minutes and 17 seconds
......@@ -1770,6 +1770,7 @@ Clone.prototype = {
}
var values = []
var axes_obj = this.m.axes
var available_axes = this.m.available_axes
for (var a = 0; a < axes.length; a++) {
var axe = axes[a]
......@@ -1777,10 +1778,10 @@ Clone.prototype = {
if (axe == undefined || naxe == undefined){
console.default.error("Getter: not axis " + axe + "; ("+naxe+")")
}
if (axes_obj.available()[naxe] != undefined && axes_obj.available()[naxe].fct != undefined) {
var value = axes_obj.available()[naxe].fct(this, timepoint)
if (round && axes_obj.available()[naxe] != undefined && axes_obj.available()[naxe].round != undefined){
value = axes_obj.available()[naxe].round(value)
if (available_axes[naxe] != undefined && available_axes[naxe].fct != undefined) {
var value = available_axes[naxe].fct(this, timepoint)
if (round && available_axes[naxe] != undefined && available_axes[naxe].round != undefined){
value = available_axes[naxe].round(value)
}
values.push( value )
} else {
......@@ -1881,11 +1882,11 @@ Clone.prototype = {
value = tmpValue
}
var axes_obj = this.m.axes
var naxe = this.m.distrib_convertion[axe]
if (axes_obj.available()[naxe] != undefined) {
if (axes_obj.available()[naxe].set != undefined) {
axes_obj.available()[naxe].set(this, value)
var available_axes = this.m.available_axes
if (available_axes[naxe] != undefined) {
if (available_axes[naxe].set != undefined) {
available_axes[naxe].set(this, value)
} else {
console.default.warn( "Axe present and NOT settable: " + axe + ";" + naxe)
}
......
......@@ -63,6 +63,7 @@ function Model() {
this.NORM_EXTERNAL = "external"
this.normalization_mode = this.NORM_FALSE
this.axes = new Axes(this)
this.available_axes = this.axes.available()
setInterval(function(){return self.updateIcon()}, 100);
}
......
......@@ -657,7 +657,7 @@ Segment.prototype = {
fillAxisBox: function (axisBox, clone) {
axisBox.removeAllChildren();
var axOpts = Clone.prototype.axisOptions();
var available_axis = (new Axes(this.m)).available();
var available_axis = this.m.available_axes
for (var i in this.selectedAxis) {
var span = document.createElement('span');
var axis = this.selectedAxis[i];
......
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