Commit b4ceda07 authored by Jean-Clement Gallardo's avatar Jean-Clement Gallardo
Browse files

Finish hotfix/SaveScale

parents e37af5f1 27262e44
...@@ -57,15 +57,17 @@ Ext.define('metExploreViz.view.form.selectConditionForm.SelectConditionFormContr ...@@ -57,15 +57,17 @@ Ext.define('metExploreViz.view.form.selectConditionForm.SelectConditionFormContr
view.lookupReference('selectCondition').on({ view.lookupReference('selectCondition').on({
change : function(that, newVal, old){ change : function(that, newVal, old){
var conditionType = view.lookupReference('selectConditionType').getValue(); var conditionType = view.lookupReference('selectConditionType').getValue();
var session = _metExploreViz.getSessionById('viz');
var nbNodes = session.getD3Data().getNodes().length;
if(conditionType === "Continuous"){ if(conditionType === "Continuous"){
var oldCondition = old+" "+conditionType; var oldCondition = old+" "+conditionType;
var newCondition = newVal+" "+conditionType; var newCondition = newVal+" "+conditionType;
if(this.getAStyleFormParent().scaleRange !== undefined){ if(this.getAStyleFormParent().scaleRange !== undefined){
this.getAStyleFormParent()[oldCondition] = this.getAStyleFormParent().scaleRange; this.getAStyleFormParent()[oldCondition+nbNodes] = this.getAStyleFormParent().scaleRange;
} }
if(this.getAStyleFormParent()[newCondition] !== null){ if(this.getAStyleFormParent()[newCondition+nbNodes] !== null){
this.getAStyleFormParent().scaleRange = this.getAStyleFormParent()[newCondition] this.getAStyleFormParent().scaleRange = this.getAStyleFormParent()[newCondition]
} }
} }
...@@ -74,10 +76,10 @@ Ext.define('metExploreViz.view.form.selectConditionForm.SelectConditionFormContr ...@@ -74,10 +76,10 @@ Ext.define('metExploreViz.view.form.selectConditionForm.SelectConditionFormContr
var oldCondition = old+" "+conditionType; var oldCondition = old+" "+conditionType;
var newCondition = newVal+" "+conditionType; var newCondition = newVal+" "+conditionType;
if(this.getAStyleFormParent().valueDiscreteMappings !== undefined){ if(this.getAStyleFormParent().valueDiscreteMappings !== undefined){
this.getAStyleFormParent()[oldCondition] = this.getAStyleFormParent().valueDiscreteMappings; this.getAStyleFormParent()[oldCondition+nbNodes] = this.getAStyleFormParent().valueDiscreteMappings;
} }
if(this.getAStyleFormParent()[newCondition] !== null){ if(this.getAStyleFormParent()[newCondition+nbNodes] !== null){
this.getAStyleFormParent().valueDiscreteMappings = this.getAStyleFormParent()[newCondition] this.getAStyleFormParent().valueDiscreteMappings = this.getAStyleFormParent()[newCondition]
} }
} }
......
Supports Markdown
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